com.clarkparsia.pellet.datatypes.types.real
Class ContinuousRealInterval

java.lang.Object
  extended by com.clarkparsia.pellet.datatypes.types.real.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 Summary
ContinuousRealInterval(java.lang.Number point)
          Create a point interval.
ContinuousRealInterval(java.lang.Number lower, java.lang.Number upper, boolean inclusiveLower, boolean inclusiveUpper)
          Create an interval.
 
Method Summary
static ContinuousRealInterval allReals()
           
 boolean boundLower()
           
 boolean boundUpper()
           
 boolean canUnionWith(ContinuousRealInterval other)
           
 IntervalRelations compare(ContinuousRealInterval other)
           
 boolean contains(java.lang.Number n)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Number getLower()
           
 java.lang.Number getUpper()
           
 ContinuousRealInterval greater(java.lang.Number n)
          Get the subinterval greater than n
 int hashCode()
           
 boolean inclusiveLower()
           
 boolean inclusiveUpper()
           
 ContinuousRealInterval intersection(ContinuousRealInterval that)
           
 boolean isPoint()
           
 ContinuousRealInterval less(java.lang.Number n)
          Get the subinterval less than n
 java.util.List<ContinuousRealInterval> remove(ContinuousRealInterval other)
           
 java.lang.Number size()
           
 java.lang.String toString()
           
 java.util.List<ContinuousRealInterval> union(ContinuousRealInterval other)
           
 java.util.Iterator<java.lang.Number> valueIterator()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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

allReals

public static ContinuousRealInterval allReals()

boundLower

public boolean boundLower()

boundUpper

public boolean boundUpper()

canUnionWith

public boolean canUnionWith(ContinuousRealInterval other)

compare

public IntervalRelations compare(ContinuousRealInterval other)

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()

intersection

public ContinuousRealInterval intersection(ContinuousRealInterval that)

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

remove

public java.util.List<ContinuousRealInterval> remove(ContinuousRealInterval other)

size

public java.lang.Number size()

toString

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

union

public java.util.List<ContinuousRealInterval> union(ContinuousRealInterval other)

valueIterator

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


Copyright © 2004 Evren Sirin. All Rights Reserved.