Package org.n52.janmayen
Class CharacterClass
- java.lang.Object
-
- org.n52.janmayen.CharacterClass
-
public final class CharacterClass extends Object
Class to represent a characater class.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Integer>chars()Get the characters represented by this class.booleanequals(Object obj)static CharacterClassforChars(Character... characters)Creates a new character class including the supplied characters.static CharacterClassforChars(Integer... characters)Creates a new character class including the supplied characters.static CharacterClassforChars(Set<Integer> characters)Creates a new character class including the supplied characters.static CharacterClassforClasses(Collection<CharacterClass> characters)Creates a new character class including the supplied character classes.static CharacterClassforClasses(CharacterClass... characters)Creates a new character class including the supplied character classes.static CharacterClassforRange(int min, int max)Creates a new character class including the range of characters betweenminandmax.inthashCode()booleanincludes(int c)Check ifcis included in this class.
-
-
-
Method Detail
-
chars
public Set<Integer> chars()
Get the characters represented by this class.- Returns:
- the characters
-
includes
public boolean includes(int c)
Check ifcis included in this class.- Parameters:
c- the character- Returns:
- if it is included
-
forClasses
public static CharacterClass forClasses(CharacterClass... characters)
Creates a new character class including the supplied character classes.- Parameters:
characters- the character classes- Returns:
- the character class
-
forClasses
public static CharacterClass forClasses(Collection<CharacterClass> characters)
Creates a new character class including the supplied character classes.- Parameters:
characters- the character classes- Returns:
- the character class
-
forRange
public static CharacterClass forRange(int min, int max)
Creates a new character class including the range of characters betweenminandmax.- Parameters:
min- the (inclusive) minimummax- the (inclusive) maximum- Returns:
- the character class
-
forChars
public static CharacterClass forChars(Character... characters)
Creates a new character class including the supplied characters.- Parameters:
characters- the characters- Returns:
- the character class
-
forChars
public static CharacterClass forChars(Integer... characters)
Creates a new character class including the supplied characters.- Parameters:
characters- the characters- Returns:
- the character class
-
forChars
public static CharacterClass forChars(Set<Integer> characters)
Creates a new character class including the supplied characters.- Parameters:
characters- the characters- Returns:
- the character class
-
-