Package com.github.zafarkhaja.semver
Enum VersionParser.CharType
- java.lang.Object
-
- java.lang.Enum<VersionParser.CharType>
-
- com.github.zafarkhaja.semver.VersionParser.CharType
-
- All Implemented Interfaces:
Stream.ElementType<java.lang.Character>
,java.io.Serializable
,java.lang.Comparable<VersionParser.CharType>
- Enclosing class:
- VersionParser
static enum VersionParser.CharType extends java.lang.Enum<VersionParser.CharType> implements Stream.ElementType<java.lang.Character>
Valid character types.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CharType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static VersionParser.CharType
forCharacter(java.lang.Character chr)
Gets the type for a given character.static VersionParser.CharType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static VersionParser.CharType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.github.zafarkhaja.semver.util.Stream.ElementType
isMatchedBy
-
-
-
-
Enum Constant Detail
-
DIGIT
public static final VersionParser.CharType DIGIT
-
LETTER
public static final VersionParser.CharType LETTER
-
DOT
public static final VersionParser.CharType DOT
-
HYPHEN
public static final VersionParser.CharType HYPHEN
-
PLUS
public static final VersionParser.CharType PLUS
-
EOI
public static final VersionParser.CharType EOI
-
ILLEGAL
public static final VersionParser.CharType ILLEGAL
-
-
Method Detail
-
values
public static VersionParser.CharType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VersionParser.CharType c : VersionParser.CharType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VersionParser.CharType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
forCharacter
static VersionParser.CharType forCharacter(java.lang.Character chr)
Gets the type for a given character.- Parameters:
chr
- the character to get the type for- Returns:
- the type of the specified character
-
-