/** * Parse an action string using the given action type to a {@code long}. The given {@code enum} type must have * 64 or fewer constant values. * * @param actionType the action {@code enum} type class * @param actionString the string to parse * @param <E> the action {@code enum} type * * @return the set of actions from the string * * @throws IllegalArgumentException if the string contained an invalid action */ public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException { if (actionString == null) { throw new IllegalArgumentException("actionString is null"); } if (actionType == null) { throw new IllegalArgumentException("actionType is null"); } final LongMatchAction<E> matchAction = new LongMatchAction<>(); doParse(actionType, actionString, matchAction); return matchAction.getResult(); }
/** * Parse an action string using the given action type to a {@code long}. The given {@code enum} type must have * 64 or fewer constant values. * * @param actionType the action {@code enum} type class * @param actionString the string to parse * @param <E> the action {@code enum} type * * @return the set of actions from the string * * @throws IllegalArgumentException if the string contained an invalid action */ public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final LongMatchAction<E> matchAction = new LongMatchAction<>(); doParse(actionType, actionString, matchAction); return matchAction.getResult(); }
/** * Parse an action string using the given action type to a {@code long}. The given {@code enum} type must have * 64 or fewer constant values. * * @param actionType the action {@code enum} type class * @param actionString the string to parse * @param <E> the action {@code enum} type * * @return the set of actions from the string * * @throws IllegalArgumentException if the string contained an invalid action */ public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final LongMatchAction<E> matchAction = new LongMatchAction<>(); doParse(actionType, actionString, matchAction); return matchAction.getResult(); }
/** * Parse an action string using the given action type to a {@code long}. The given {@code enum} type must have * 64 or fewer constant values. * * @param actionType the action {@code enum} type class * @param actionString the string to parse * @param <E> the action {@code enum} type * * @return the set of actions from the string * * @throws IllegalArgumentException if the string contained an invalid action */ public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final LongMatchAction<E> matchAction = new LongMatchAction<>(); doParse(actionType, actionString, matchAction); return matchAction.getResult(); }
/** * Parse an action string using the given action type to a {@code long}. The given {@code enum} type must have * 64 or fewer constant values. * * @param actionType the action {@code enum} type class * @param actionString the string to parse * @param <E> the action {@code enum} type * * @return the set of actions from the string * * @throws IllegalArgumentException if the string contained an invalid action */ public static <E extends Enum<E>> long parseActionStringToLong(Class<E> actionType, String actionString) throws IllegalArgumentException { Assert.checkNotNullParam("actionType", actionType); Assert.checkNotNullParam("actionString", actionString); final LongMatchAction<E> matchAction = new LongMatchAction<>(); doParse(actionType, actionString, matchAction); return matchAction.getResult(); }