Package org.sonar.java.regex.ast
Class FlagSet
- java.lang.Object
-
- org.sonar.java.regex.ast.FlagSet
-
public class FlagSet extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int flag)voidadd(int flag, JavaCharacter character)voidaddAll(FlagSet other)booleancontains(int flag)JavaCharactergetJavaCharacterForFlag(int flag)Returns the character inside the regex that was used to add the given flag to this set.intgetMask()booleanisEmpty()voidremoveAll(FlagSet other)
-
-
-
Constructor Detail
-
FlagSet
public FlagSet()
-
FlagSet
public FlagSet(FlagSet other)
-
FlagSet
public FlagSet(int initialFlags)
-
-
Method Detail
-
contains
public boolean contains(int flag)
-
getJavaCharacterForFlag
@CheckForNull public JavaCharacter getJavaCharacterForFlag(int flag)
Returns the character inside the regex that was used to add the given flag to this set. This will return null if the set doesn't contain the given flag or if the flag has been set from outside of the regex (i.e. as an argument to Pattern.compile). Therefore this should not be used to check whether a flag is contained in this set.
-
add
public void add(int flag)
-
add
public void add(int flag, JavaCharacter character)
-
addAll
public void addAll(FlagSet other)
-
removeAll
public void removeAll(FlagSet other)
-
getMask
public int getMask()
-
isEmpty
public boolean isEmpty()
-
-