java.lang.Object
java.lang.Enum<Inclusion>
com.speedment.jpastreamer.field.predicate.Inclusion
All Implemented Interfaces:
Serializable, Comparable<Inclusion>, java.lang.constant.Constable

public enum Inclusion extends Enum<Inclusion>
Determines if a range of results should be start and/or end-inclusive.

For an example, take the series [1 2 3 4 5]. If we select the range (2, 4) from this series, we will get the following results:

Inclusion
Enum Constant Included Elements
START_INCLUSIVE_END_INCLUSIVE [2, 3, 4]
START_INCLUSIVE_END_EXCLUSIVE [2, 3]
START_EXCLUSIVE_END_INCLUSIVE [3, 4]
START_EXCLUSIVE_END_EXCLUSIVE [3]
Since:
2.2.0
Author:
Per Minborg, Emil Forslund
  • Enum Constant Details

    • START_INCLUSIVE_END_INCLUSIVE

      public static final Inclusion START_INCLUSIVE_END_INCLUSIVE
    • START_INCLUSIVE_END_EXCLUSIVE

      public static final Inclusion START_INCLUSIVE_END_EXCLUSIVE
    • START_EXCLUSIVE_END_INCLUSIVE

      public static final Inclusion START_EXCLUSIVE_END_INCLUSIVE
    • START_EXCLUSIVE_END_EXCLUSIVE

      public static final Inclusion START_EXCLUSIVE_END_EXCLUSIVE
  • Method Details

    • values

      public static Inclusion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Inclusion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isStartInclusive

      public boolean isStartInclusive()
      Returns true if the first element in the range should be included, else false.
      Returns:
      true if start is included, else false
    • isEndInclusive

      public boolean isEndInclusive()
      Returns true if the last element in the range should be included, else false.
      Returns:
      true if end is included, else false