Class ContinuousRealInterval


  • public class ContinuousRealInterval
    extends java.lang.Object

    Title: owl:real Interval

    Description: An immutable interval representation supporting continuous (decimal and rational) number lines in owl:real value space.

    Copyright: Copyright (c) 2009

    Company: Clark & Parsia, LLC.

    Author:
    Mike Smith
    • Constructor Detail

      • ContinuousRealInterval

        public ContinuousRealInterval​(java.lang.Number point)
        Create a _point interval. This is equivalent to OWLRealInterval(Number, Number, boolean, boolean) with arguments point,point,true,true
        Parameters:
        point - Value of point interval
      • ContinuousRealInterval

        public ContinuousRealInterval​(java.lang.Number lower,
                                      java.lang.Number upper,
                                      boolean inclusiveLower,
                                      boolean inclusiveUpper)
        Create an interval. null should be used to indicate unbound (i.e., infinite intervals).
        Parameters:
        lower - Interval _lower bound
        upper - Interval _upper bound
        inclusiveLower - true if _lower bound is inclusive, false for exclusive. Ignored if _lower == null.
        inclusiveUpper - true if _upper bound is inclusive, false for exclusive. Ignored if _upper == null.
    • Method Detail

      • boundLower

        public boolean boundLower()
      • boundUpper

        public boolean boundUpper()
      • contains

        public boolean contains​(java.lang.Number n)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getLower

        public java.lang.Number getLower()
      • getUpper

        public java.lang.Number getUpper()
      • greater

        public ContinuousRealInterval greater​(java.lang.Number n)
        Get the subinterval greater than n
        Parameters:
        n -
        Returns:
        a new interval, formed by intersecting this interval with (n,+inf) or null if that intersection is empty
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • inclusiveLower

        public boolean inclusiveLower()
      • inclusiveUpper

        public boolean inclusiveUpper()
      • isPoint

        public boolean isPoint()
      • less

        public ContinuousRealInterval less​(java.lang.Number n)
        Get the subinterval less than n
        Parameters:
        n -
        Returns:
        a new interval, formed by intersecting this interval with (-inf,n) or null if that intersection is empty
      • size

        public java.lang.Number size()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • valueIterator

        public java.util.Iterator<java.lang.Number> valueIterator()