Class CompositeExpression.Helper
- java.lang.Object
-
- com.github.zafarkhaja.semver.expr.CompositeExpression.Helper
-
- Enclosing class:
- CompositeExpression
public static class CompositeExpression.Helper extends 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 CompositeExpressioneq(Version version)Creates aCompositeExpressionwith an underlyingEqualexpression.static CompositeExpressioneq(String version)Creates aCompositeExpressionwith an underlyingEqualexpression.static CompositeExpressiongt(Version version)Creates aCompositeExpressionwith an underlyingGreaterexpression.static CompositeExpressiongt(String version)Creates aCompositeExpressionwith an underlyingGreaterexpression.static CompositeExpressiongte(Version version)Creates aCompositeExpressionwith an underlyingGreaterOrEqualexpression.static CompositeExpressiongte(String version)Creates aCompositeExpressionwith an underlyingGreaterOrEqualexpression.static CompositeExpressionlt(Version version)Creates aCompositeExpressionwith an underlyingLessexpression.static CompositeExpressionlt(String version)Creates aCompositeExpressionwith an underlyingLessexpression.static CompositeExpressionlte(Version version)Creates aCompositeExpressionwith an underlyingLessOrEqualexpression.static CompositeExpressionlte(String version)Creates aCompositeExpressionwith an underlyingLessOrEqualexpression.static CompositeExpressionneq(Version version)Creates aCompositeExpressionwith an underlyingNotEqualexpression.static CompositeExpressionneq(String version)Creates aCompositeExpressionwith an underlyingNotEqualexpression.static CompositeExpressionnot(Expression expr)Creates aCompositeExpressionwith an underlyingNotexpression.
-
-
-
Method Detail
-
not
public static CompositeExpression not(Expression expr)
Creates aCompositeExpressionwith an underlyingNotexpression.- Parameters:
expr- anExpressionto negate- Returns:
- a newly created
CompositeExpression
-
eq
public static CompositeExpression eq(Version version)
Creates aCompositeExpressionwith an underlyingEqualexpression.- Parameters:
version- aVersionto check for equality- Returns:
- a newly created
CompositeExpression
-
eq
public static CompositeExpression eq(String version)
Creates aCompositeExpressionwith an underlyingEqualexpression.- Parameters:
version- aVersionstring to check for equality- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
neq
public static CompositeExpression neq(Version version)
Creates aCompositeExpressionwith an underlyingNotEqualexpression.- Parameters:
version- aVersionto check for non-equality- Returns:
- a newly created
CompositeExpression
-
neq
public static CompositeExpression neq(String version)
Creates aCompositeExpressionwith an underlyingNotEqualexpression.- Parameters:
version- aVersionstring to check for non-equality- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
gt
public static CompositeExpression gt(Version version)
Creates aCompositeExpressionwith an underlyingGreaterexpression.- Parameters:
version- aVersionto compare with- Returns:
- a newly created
CompositeExpression
-
gt
public static CompositeExpression gt(String version)
Creates aCompositeExpressionwith an underlyingGreaterexpression.- Parameters:
version- aVersionstring to compare with- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
gte
public static CompositeExpression gte(Version version)
Creates aCompositeExpressionwith an underlyingGreaterOrEqualexpression.- Parameters:
version- aVersionto compare with- Returns:
- a newly created
CompositeExpression
-
gte
public static CompositeExpression gte(String version)
Creates aCompositeExpressionwith an underlyingGreaterOrEqualexpression.- Parameters:
version- aVersionstring to compare with- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
lt
public static CompositeExpression lt(Version version)
Creates aCompositeExpressionwith an underlyingLessexpression.- Parameters:
version- aVersionto compare with- Returns:
- a newly created
CompositeExpression
-
lt
public static CompositeExpression lt(String version)
Creates aCompositeExpressionwith an underlyingLessexpression.- Parameters:
version- aVersionstring to compare with- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
lte
public static CompositeExpression lte(Version version)
Creates aCompositeExpressionwith an underlyingLessOrEqualexpression.- Parameters:
version- aVersionto compare with- Returns:
- a newly created
CompositeExpression
-
lte
public static CompositeExpression lte(String version)
Creates aCompositeExpressionwith an underlyingLessOrEqualexpression.- Parameters:
version- aVersionstring to compare with- Returns:
- a newly created
CompositeExpression - Throws:
IllegalArgumentException- if the input string isNULLor emptyParseException- when invalid version string is providedUnexpectedCharacterException- is a special case ofParseException
-
-