Class Limit

java.lang.Object
com.yahoo.prelude.query.Limit

public class Limit extends Object
An immutable numeric range limit which can be inclusive or exclusive
Author:
bratseth
  • Field Details

    • NEGATIVE_INFINITY

      public static final Limit NEGATIVE_INFINITY
    • POSITIVE_INFINITY

      public static final Limit POSITIVE_INFINITY
  • Constructor Details

    • Limit

      public Limit(Number number, boolean inclusive)
  • Method Details

    • number

      public Number number()
    • isInclusive

      public boolean isInclusive()
      Returns true if this limit includes its number, false if it excludes it
    • min

      public Limit min(Limit other)
      Returns the smaller of this and the given limit
    • max

      public Limit max(Limit other)
      Returns the larger of this and the given limit
    • isSmallerOrEqualTo

      public boolean isSmallerOrEqualTo(Limit other)
    • isLargerOrEqualTo

      public boolean isLargerOrEqualTo(Limit other)
    • isInfinite

      public boolean isInfinite()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object