com.clarkparsia.pellet.datatypes
Class OWLRealInterval

java.lang.Object
  extended by com.clarkparsia.pellet.datatypes.OWLRealInterval

public class OWLRealInterval
extends java.lang.Object

Title: owl:real Interval

Description: An immutable interval representation supporting the owl:real value space. Supports continuous (real) number lines, discontinuous (real - integer) number lines, and discrete (integer) number lines.

Copyright: Copyright (c) 2009

Company: Clark & Parsia, LLC.

Author:
Mike Smith

Nested Class Summary
static class OWLRealInterval.IntegerIterator
           
static class OWLRealInterval.LineType
           
 
Constructor Summary
OWLRealInterval(java.lang.Number point)
          Create a point interval.
OWLRealInterval(java.lang.Number lower, java.lang.Number upper, boolean inclusiveLower, boolean inclusiveUpper, OWLRealInterval.LineType type)
          Create an interval.
 
Method Summary
static OWLRealInterval allIntegers()
           
static OWLRealInterval allReals()
           
 boolean boundLower()
           
 boolean boundUpper()
           
 IntervalRelations compare(OWLRealInterval other)
           
 boolean contains(java.lang.Number n)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Number getLower()
           
 OWLRealInterval.LineType getType()
           
 java.lang.Number getUpper()
           
 OWLRealInterval greater(java.lang.Number n)
          Get the subinterval greater than n
 int hashCode()
           
 boolean inclusiveLower()
           
 boolean inclusiveUpper()
           
 OWLRealInterval intersection(OWLRealInterval that)
           
 boolean isFinite()
           
 boolean isPoint()
           
 OWLRealInterval less(java.lang.Number n)
          Get the subinterval less than n
 java.util.List<OWLRealInterval> remove(OWLRealInterval other)
           
 java.lang.Number size()
           
 java.lang.String toString()
           
 java.util.List<OWLRealInterval> union(OWLRealInterval other)
           
 java.util.Iterator<java.lang.Number> valueIterator()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OWLRealInterval

public OWLRealInterval(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

OWLRealInterval

public OWLRealInterval(java.lang.Number lower,
                       java.lang.Number upper,
                       boolean inclusiveLower,
                       boolean inclusiveUpper,
                       OWLRealInterval.LineType type)
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

allIntegers

public static OWLRealInterval allIntegers()

allReals

public static OWLRealInterval allReals()

boundLower

public boolean boundLower()

boundUpper

public boolean boundUpper()

compare

public IntervalRelations compare(OWLRealInterval 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()

getType

public OWLRealInterval.LineType getType()

getUpper

public java.lang.Number getUpper()

greater

public OWLRealInterval 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 OWLRealInterval intersection(OWLRealInterval that)

isFinite

public boolean isFinite()

isPoint

public boolean isPoint()

less

public OWLRealInterval 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<OWLRealInterval> remove(OWLRealInterval 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<OWLRealInterval> union(OWLRealInterval other)

valueIterator

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


Copyright © 2004 Evren Sirin. All Rights Reserved.