Package xyz.rk0cc.josev.constraint
Enum Class UnsupportedConstraintPattern
java.lang.Object
java.lang.Enum<UnsupportedConstraintPattern>
xyz.rk0cc.josev.constraint.UnsupportedConstraintPattern
- All Implemented Interfaces:
Serializable
,Comparable<UnsupportedConstraintPattern>
,Constable
,ConstraintPattern<UnsupportedConstraintPattern>
public enum UnsupportedConstraintPattern
extends Enum<UnsupportedConstraintPattern>
implements ConstraintPattern<UnsupportedConstraintPattern>
This
It mostly uses for mixed multiple constraint pattern allows platform like NPM which it becomes complicated when forcing to define
Enum
is designed for SemVerConstraint
which unable to define pattern
.
It mostly uses for mixed multiple constraint pattern allows platform like NPM which it becomes complicated when forcing to define
ConstraintPattern
. Therefore, if the implemented platform's constraint pattern can be ease
to define, do not uses UnsupportedConstraintPattern
.- Since:
- 3.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Some format of constraint pattern allows parsenull
.final boolean
isValidConstraintMethods
(String versionConstraint) Determine aString
of version constraint is following currentEnum
ofConstraintPattern
or finding whichConstraintPattern
uses whenparsing
the constraint byfiltering
Enum
.static UnsupportedConstraintPattern
Returns the enum constant of this class with the specified name.static UnsupportedConstraintPattern[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSUPPORTED
The one and onlyEnum
value provides in thisConstraintPattern
.
It declared as no constraint pattern definition support forSemVerConstraint
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
conditionFunction
APredicate
providing aString
is follow the syntax of version constraint. TheString
parameter may benull
.- Specified by:
conditionFunction
in interfaceConstraintPattern<UnsupportedConstraintPattern>
- Returns:
- A
Predicate
interface but throwsUnsupportedOperationException
wheninvoked
.
-
acceptParseNull
public final boolean acceptParseNull()Some format of constraint pattern allows parsenull
. If this method returntrue
, it means, this constraint pattern is acceptednull
.
By default, it returnsfalse
since it rarely to allows to do it. And no duplicatedEnum's value
can benull
.- Specified by:
acceptParseNull
in interfaceConstraintPattern<UnsupportedConstraintPattern>
- Returns:
- Always
false
, no exception.
-
isValidConstraintMethods
Determine aString
of version constraint is following currentEnum
ofConstraintPattern
or finding whichConstraintPattern
uses whenparsing
the constraint byfiltering
Enum
.- Specified by:
isValidConstraintMethods
in interfaceConstraintPattern<UnsupportedConstraintPattern>
- Parameters:
versionConstraint
- AString
(includingnull
) of version constraint.- Returns:
- Always
false
, no exception.
-