public class RestrictedBooleanDatatype extends Object implements RestrictedDatatype<Boolean>
Title: Restricted Boolean Datatype
Description: A subset of the value space of xsd:boolean.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Constructor and Description |
|---|
RestrictedBooleanDatatype(Datatype<Boolean> dt) |
| Modifier and Type | Method and Description |
|---|---|
RestrictedDatatype<Boolean> |
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<Boolean> |
exclude(Collection<?> values)
Exclude specific elements from the data range.
|
Datatype<? extends Boolean> |
getDatatype()
Query for the base datatype of a restricted datatype.
|
Boolean |
getValue(int i)
Return a value from an enumerable data range.
|
RestrictedDatatype<Boolean> |
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.
|
RestrictedDatatype<Boolean> |
union(RestrictedDatatype<?> other)
Union this range with another range.
|
Iterator<Boolean> |
valueIterator()
Get a (possibly infinite) iterator over values in the data range.
|
public RestrictedDatatype<Boolean> applyConstrainingFacet(aterm.ATermAppl facet, Object value) throws InvalidConstrainingFacetException
RestrictedDatatypeapplyConstrainingFacet in interface RestrictedDatatype<Boolean>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)InvalidConstrainingFacetExceptionpublic boolean contains(Object value)
DataRangepublic boolean containsAtLeast(int n)
DataRangecontainsAtLeast in interface DataRange<Boolean>n - the number of elementstrue if the data range contains n or
more elements, false otherwisepublic RestrictedDatatype<Boolean> exclude(Collection<?> values)
RestrictedDatatypevalues that are not contained in the restriction are
ignored.exclude in interface RestrictedDatatype<Boolean>values - The values to excludeRestrictedDatatypepublic Datatype<? extends Boolean> getDatatype()
RestrictedDatatypegetDatatype in interface RestrictedDatatype<Boolean>public Boolean getValue(int i)
DataRangeLiteralValueBranch shiftTryNextpublic RestrictedDatatype<Boolean> intersect(RestrictedDatatype<?> other, boolean negated)
RestrictedDatatypegetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()intersect in interface RestrictedDatatype<Boolean>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<Boolean>true if the data range is enumerable,
false otherwisepublic boolean isFinite()
DataRangepublic int size()
DataRangeLiteralValueBranch constructorpublic RestrictedDatatype<Boolean> union(RestrictedDatatype<?> other)
RestrictedDatatypegetDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()union in interface RestrictedDatatype<Boolean>other - restricted datatype to merge with thisRestrictedDatatype, representing the intersection
of this and otherCopyright © 2019. All rights reserved.