org.modeshape.jcr.query.model

## Class Between

- java.lang.Object
- - org.modeshape.jcr.query.model.Between

- All Implemented Interfaces:
    Serializable, Constraint, Between, LanguageObject, Visitable

      @Immutable
      public class Between
      extends Object
      implements Constraint, Between

  A constraint that evaluates to true when the value defined by the dynamic operand evaluates to be within the specified range.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound)` Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds (inclusive).
    `Between(DynamicOperand operand, StaticOperand lowerBound, StaticOperand upperBound, boolean includeLowerBound, boolean includeUpperBound)` Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds, specifying whether the boundary values are to be included in the range.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(Visitor visitor)` Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
    `boolean` | `equals(Object obj)`
    `StaticOperand` | `getLowerBound()` Get the lower bound operand.
    `DynamicOperand` | `getOperand()` Get the dynamic operand specification.
    `StaticOperand` | `getUpperBound()` Get the upper bound operand.
    `int` | `hashCode()`
    `boolean` | `isLowerBoundIncluded()` Return whether the lower bound is to be included in the results.
    `boolean` | `isUpperBoundIncluded()` Return whether the upper bound is to be included in the results.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Between

          public Between(DynamicOperand operand,
                 StaticOperand lowerBound,
                 StaticOperand upperBound)

      Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds (inclusive).
      Parameters:
        `operand` - the dynamic operand describing the values that are to be constrained
        `lowerBound` - the lower bound of the range
        `upperBound` - the upper bound of the range
      Throws:
        `IllegalArgumentException` - if any of the arguments are null

    - #### Between

          public Between(DynamicOperand operand,
                 StaticOperand lowerBound,
                 StaticOperand upperBound,
                 boolean includeLowerBound,
                 boolean includeUpperBound)

      Create a constraint that the values of the supplied dynamic operand are between the lower and upper bounds, specifying whether the boundary values are to be included in the range.
      Parameters:
        `operand` - the dynamic operand describing the values that are to be constrained
        `lowerBound` - the lower bound of the range
        `upperBound` - the upper bound of the range
        `includeLowerBound` - true if the lower boundary value is not be included
        `includeUpperBound` - true if the upper boundary value is not be included
      Throws:
        `IllegalArgumentException` - if any of the arguments are null

  - ### Method Detail

    - #### getOperand

          public DynamicOperand getOperand()

      Description copied from interface: `Between`
      Get the dynamic operand specification.
      Specified by:
        `getOperand` in interface `Between`
      Returns:
        the dynamic operand; never null

    - #### getLowerBound

          public StaticOperand getLowerBound()

      Description copied from interface: `Between`
      Get the lower bound operand.
      Specified by:
        `getLowerBound` in interface `Between`
      Returns:
        the lower bound; never null

    - #### getUpperBound

          public StaticOperand getUpperBound()

      Description copied from interface: `Between`
      Get the upper bound operand.
      Specified by:
        `getUpperBound` in interface `Between`
      Returns:
        the upper bound; never null

    - #### isLowerBoundIncluded

          public boolean isLowerBoundIncluded()

      Description copied from interface: `Between`
      Return whether the lower bound is to be included in the results.
      Specified by:
        `isLowerBoundIncluded` in interface `Between`
      Returns:
        true if the `lower bound` is to be included, or false otherwise

    - #### isUpperBoundIncluded

          public boolean isUpperBoundIncluded()

      Description copied from interface: `Between`
      Return whether the upper bound is to be included in the results.
      Specified by:
        `isUpperBoundIncluded` in interface `Between`
      Returns:
        true if the `upper bound` is to be included, or false otherwise

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### accept

          public void accept(Visitor visitor)

      Description copied from interface: `Visitable`
      Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
      Specified by:
        `accept` in interface `Visitable`
      Parameters:
        `visitor` - the visitor; never null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.