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 void
add(int flag)
void
add(int flag, SourceCharacter character)
void
addAll(FlagSet other)
boolean
contains(int flag)
SourceCharacter
getJavaCharacterForFlag(int flag)
Returns the character inside the regex that was used to add the given flag to this set.int
getMask()
boolean
isEmpty()
void
removeAll(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 SourceCharacter 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, SourceCharacter character)
-
addAll
public void addAll(FlagSet other)
-
removeAll
public void removeAll(FlagSet other)
-
getMask
public int getMask()
-
isEmpty
public boolean isEmpty()
-
-