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 Details

    • Helper

      public Helper()
  • Method Details

    • not

      public static CompositeExpression not(Expression expr)
      Creates a CompositeExpression with an underlying Not expression.
      Parameters:
      expr - an Expression to negate
      Returns:
      a newly created CompositeExpression
    • eq

      public static CompositeExpression eq(Version version)
      Creates a CompositeExpression with an underlying Equal expression.
      Parameters:
      version - a Version to check for equality
      Returns:
      a newly created CompositeExpression
    • eq

      public static CompositeExpression eq(String version)
      Creates a CompositeExpression with an underlying Equal expression.
      Parameters:
      version - a Version string to check for equality
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException
    • neq

      public static CompositeExpression neq(Version version)
      Creates a CompositeExpression with an underlying NotEqual expression.
      Parameters:
      version - a Version to check for non-equality
      Returns:
      a newly created CompositeExpression
    • neq

      public static CompositeExpression neq(String version)
      Creates a CompositeExpression with an underlying NotEqual expression.
      Parameters:
      version - a Version string to check for non-equality
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException
    • gt

      public static CompositeExpression gt(Version version)
      Creates a CompositeExpression with an underlying Greater expression.
      Parameters:
      version - a Version to compare with
      Returns:
      a newly created CompositeExpression
    • gt

      public static CompositeExpression gt(String version)
      Creates a CompositeExpression with an underlying Greater expression.
      Parameters:
      version - a Version string to compare with
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException
    • gte

      public static CompositeExpression gte(Version version)
      Creates a CompositeExpression with an underlying GreaterOrEqual expression.
      Parameters:
      version - a Version to compare with
      Returns:
      a newly created CompositeExpression
    • gte

      public static CompositeExpression gte(String version)
      Creates a CompositeExpression with an underlying GreaterOrEqual expression.
      Parameters:
      version - a Version string to compare with
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException
    • lt

      public static CompositeExpression lt(Version version)
      Creates a CompositeExpression with an underlying Less expression.
      Parameters:
      version - a Version to compare with
      Returns:
      a newly created CompositeExpression
    • lt

      public static CompositeExpression lt(String version)
      Creates a CompositeExpression with an underlying Less expression.
      Parameters:
      version - a Version string to compare with
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException
    • lte

      public static CompositeExpression lte(Version version)
      Creates a CompositeExpression with an underlying LessOrEqual expression.
      Parameters:
      version - a Version to compare with
      Returns:
      a newly created CompositeExpression
    • lte

      public static CompositeExpression lte(String version)
      Creates a CompositeExpression with an underlying LessOrEqual expression.
      Parameters:
      version - a Version string to compare with
      Returns:
      a newly created CompositeExpression
      Throws:
      IllegalArgumentException - if the input string is NULL or empty
      ParseException - when invalid version string is provided
      UnexpectedCharacterException - is a special case of ParseException