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