@Test public void testCommonPrefixActionString() { EnumSet<ActionSetTwo> set; set = PermissionActions.parseActionStringToSet(ActionSetTwo.class, ""); assertEquals(0, set.size()); set = PermissionActions.parseActionStringToSet(ActionSetTwo.class, "foobar,fooba"); assertEquals(2, set.size()); assertTrue(set.contains(ActionSetTwo.fooba)); assertTrue(set.contains(ActionSetTwo.foobar)); set = PermissionActions.parseActionStringToSet(ActionSetTwo.class, "foobar,fooba,foobazz"); assertEquals(3, set.size()); assertTrue(set.contains(ActionSetTwo.fooba)); assertTrue(set.contains(ActionSetTwo.foobar)); assertTrue(set.contains(ActionSetTwo.foobazz)); set = PermissionActions.parseActionStringToSet(ActionSetTwo.class, "foobar,fooba,foobazz,foobaz"); assertEquals(4, set.size()); assertTrue(set.contains(ActionSetTwo.fooba)); assertTrue(set.contains(ActionSetTwo.foobar)); assertTrue(set.contains(ActionSetTwo.foobaz)); assertTrue(set.contains(ActionSetTwo.foobazz)); }
public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); static EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString); static int parseActionStringToInt(Class<E> actionType, String actionString); static long parseActionStringToLong(Class<E> actionType, String actionString); static String getCanonicalActionString(EnumSet<E> set); static void getCanonicalActionString(EnumSet<E> set, StringBuilder b); static String getCanonicalActionString(Class<E> type, int set); static void getCanonicalActionString(Class<E> type, int set, StringBuilder b); static String getCanonicalActionString(Class<E> type, long set); static void getCanonicalActionString(Class<E> type, long set, StringBuilder b); }
PermissionActions { public static <E extends Enum<E>> EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final SetMatchAction<E> matchAction = new SetMatchAction<>(EnumSet.noneOf(actionType)); doParse(actionType, actionString, matchAction); return matchAction.getSet(); } private  PermissionActions(); static EnumSet<E> parseActionStringToSet(Class<E> actionType, String actionString); static int parseActionStringToInt(Class<E> actionType, String actionString); static long parseActionStringToLong(Class<E> actionType, String actionString); static String getCanonicalActionString(EnumSet<E> set); static void getCanonicalActionString(EnumSet<E> set, StringBuilder b); static String getCanonicalActionString(Class<E> type, int set); static void getCanonicalActionString(Class<E> type, int set, StringBuilder b); static String getCanonicalActionString(Class<E> type, long set); static void getCanonicalActionString(Class<E> type, long set, StringBuilder b);  }