Class ContinuousRealInterval
- java.lang.Object
-
- openllet.core.datatypes.types.real.ContinuousRealInterval
-
public class ContinuousRealInterval extends java.lang.Object
Title:
owl:real
IntervalDescription: 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
Constructors Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 nint
hashCode()
boolean
inclusiveLower()
boolean
inclusiveUpper()
ContinuousRealInterval
intersection(ContinuousRealInterval that)
boolean
isPoint()
ContinuousRealInterval
less(java.lang.Number n)
Get the subinterval less than njava.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()
-
-
-
Constructor Detail
-
ContinuousRealInterval
public ContinuousRealInterval(java.lang.Number point)
Create a _point interval. This is equivalent to OWLRealInterval(Number, Number, boolean, boolean) with argumentspoint,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 boundupper
- Interval _upper boundinclusiveLower
-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 classjava.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 classjava.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 classjava.lang.Object
-
union
public java.util.List<ContinuousRealInterval> union(ContinuousRealInterval other)
-
valueIterator
public java.util.Iterator<java.lang.Number> valueIterator()
-
-