Class CompositeExpression.Helper
java.lang.Object
com.github.zafarkhaja.semver.expr.CompositeExpression.Helper
- Enclosing class:
- CompositeExpression
A class with static helper methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CompositeExpression
Creates aCompositeExpression
with an underlyingEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingGreater
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingGreater
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingGreaterOrEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingGreaterOrEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingLess
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingLess
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingLessOrEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingLessOrEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingNotEqual
expression.static CompositeExpression
Creates aCompositeExpression
with an underlyingNotEqual
expression.static CompositeExpression
not
(Expression expr) Creates aCompositeExpression
with an underlyingNot
expression.
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
not
Creates aCompositeExpression
with an underlyingNot
expression.- Parameters:
expr
- anExpression
to negate- Returns:
- a newly created
CompositeExpression
-
eq
Creates aCompositeExpression
with an underlyingEqual
expression.- Parameters:
version
- aVersion
to check for equality- Returns:
- a newly created
CompositeExpression
-
eq
Creates aCompositeExpression
with an underlyingEqual
expression.- Parameters:
version
- aVersion
string to check for equality- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-
neq
Creates aCompositeExpression
with an underlyingNotEqual
expression.- Parameters:
version
- aVersion
to check for non-equality- Returns:
- a newly created
CompositeExpression
-
neq
Creates aCompositeExpression
with an underlyingNotEqual
expression.- Parameters:
version
- aVersion
string to check for non-equality- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-
gt
Creates aCompositeExpression
with an underlyingGreater
expression.- Parameters:
version
- aVersion
to compare with- Returns:
- a newly created
CompositeExpression
-
gt
Creates aCompositeExpression
with an underlyingGreater
expression.- Parameters:
version
- aVersion
string to compare with- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-
gte
Creates aCompositeExpression
with an underlyingGreaterOrEqual
expression.- Parameters:
version
- aVersion
to compare with- Returns:
- a newly created
CompositeExpression
-
gte
Creates aCompositeExpression
with an underlyingGreaterOrEqual
expression.- Parameters:
version
- aVersion
string to compare with- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-
lt
Creates aCompositeExpression
with an underlyingLess
expression.- Parameters:
version
- aVersion
to compare with- Returns:
- a newly created
CompositeExpression
-
lt
Creates aCompositeExpression
with an underlyingLess
expression.- Parameters:
version
- aVersion
string to compare with- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-
lte
Creates aCompositeExpression
with an underlyingLessOrEqual
expression.- Parameters:
version
- aVersion
to compare with- Returns:
- a newly created
CompositeExpression
-
lte
Creates aCompositeExpression
with an underlyingLessOrEqual
expression.- Parameters:
version
- aVersion
string to compare with- Returns:
- a newly created
CompositeExpression
- Throws:
IllegalArgumentException
- if the input string isNULL
or emptyParseException
- when invalid version string is providedUnexpectedCharacterException
- is a special case ofParseException
-