public class RestrictedRealDatatype extends Object implements RestrictedDatatype<Number>
Title: Restricted Real Datatype
Description: A subset of the value space of owl:real.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Constructor and Description |
|---|
RestrictedRealDatatype(Datatype<? extends Number> datatype,
OWLRealInterval interval) |
| Modifier and Type | Method and Description |
|---|---|
RestrictedDatatype<Number> |
applyConstrainingFacet(aterm.ATermAppl facet,
Object value)
Apply a constraining facet to further restrict the value space
|
boolean |
contains(Object value)
Check if a data range contains a particular value
|
boolean |
containsAtLeast(int n)
Check that a data range contains a minimum number of elements
|
RestrictedDatatype<Number> |
exclude(Collection<?> values)
Exclude specific elements from the data range.
|
Datatype<? extends Number> |
getDatatype()
Query for the base datatype of a restricted datatype.
|
Number |
getValue(int i)
Return a value from an enumerable data range.
|
RestrictedDatatype<Number> |
intersect(RestrictedDatatype<?> other,
boolean negated)
Intersect this range with another range.
|
boolean |
isEmpty()
Convenience method equivalent to
!containsAtLeast(0) |
boolean |
isEnumerable()
Query if values in the data range can be enumerated.
|
boolean |
isFinite()
Query if there are a finite number of values in the data range.
|
int |
size()
Return the size of the data range.
|
String |
toString() |
RestrictedDatatype<Number> |
union(RestrictedDatatype<?> other)
Union this range with another range.
|
Iterator<Number> |
valueIterator()
Get a (possibly infinite) iterator over values in the data range.
|
public RestrictedRealDatatype(Datatype<? extends Number> datatype, OWLRealInterval interval)
public RestrictedDatatype<Number> applyConstrainingFacet(aterm.ATermAppl facet, Object value)
RestrictedDatatypeapplyConstrainingFacet in interface RestrictedDatatype<Number>facet - the constraining facet name (typically a URI)value - the value for the constraining facet. This is not necessarily
in the value space of the base datatype (e.g., length facet
values on string types are not)public boolean contains(Object value)
DataRangepublic boolean containsAtLeast(int n)
DataRangecontainsAtLeast in interface DataRange<Number>n - the number of elementstrue if the data range contains n or
more elements, false otherwisepublic RestrictedDatatype<Number> exclude(Collection<?> values)
RestrictedDatatypevalues that are not contained in the restriction are
ignored.exclude in interface RestrictedDatatype<Number>values - The values to excludeRestrictedDatatypepublic Datatype<? extends Number> getDatatype()
RestrictedDatatypegetDatatype in interface RestrictedDatatype<Number>public Number getValue(int i)
DataRangeLiteralValueBranch shiftTryNextpublic RestrictedDatatype<Number> intersect(RestrictedDatatype<?> other, boolean negated)
RestrictedDatatypegetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()intersect in interface RestrictedDatatype<Number>other - restricted datatype to merge into thisnegated - true if other is negated,
false elseRestrictedDatatype, representing the intersection
of this and otherpublic boolean isEmpty()
DataRange!containsAtLeast(0)public boolean isEnumerable()
DataRangeisEnumerable in interface DataRange<Number>true if the data range is enumerable,
false otherwisepublic boolean isFinite()
DataRangepublic int size()
DataRangeLiteralValueBranch constructorpublic RestrictedDatatype<Number> union(RestrictedDatatype<?> other)
RestrictedDatatypegetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()union in interface RestrictedDatatype<Number>other - restricted datatype to merge with thisRestrictedDatatype, representing the intersection
of this and otherpublic Iterator<Number> valueIterator()
DataRangevalueIterator in interface DataRange<Number>IteratorCopyright © 2019. All rights reserved.