public interface RestrictedDatatype<T> extends DataRange<T>
Title: Restricted Datatype
Description: Interface representing the value space of a datatype, optionally
constrained by application of constraing facets (see
applyConstrainingFacet(ATermAppl, Object)), and optionally excluding
specific values (see exclude(Collection)).Implementations should
be immutable, with all mutators returning either the object unchanged, or a
new object.
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Modifier and Type | Method and Description |
|---|---|
RestrictedDatatype<T> |
applyConstrainingFacet(aterm.ATermAppl facet,
Object value)
Apply a constraining facet to further restrict the value space
|
RestrictedDatatype<T> |
exclude(Collection<?> values)
Exclude specific elements from the data range.
|
Datatype<? extends T> |
getDatatype()
Query for the base datatype of a restricted datatype.
|
RestrictedDatatype<T> |
intersect(RestrictedDatatype<?> other,
boolean negated)
Intersect this range with another range.
|
RestrictedDatatype<T> |
union(RestrictedDatatype<?> other)
Union this range with another range.
|
contains, containsAtLeast, getValue, isEmpty, isEnumerable, isFinite, size, valueIteratorDatatype<? extends T> getDatatype()
RestrictedDatatype<T> applyConstrainingFacet(aterm.ATermAppl facet, Object value) throws InvalidConstrainingFacetException
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)InvalidConstrainingFacetExceptionRestrictedDatatype<T> intersect(RestrictedDatatype<?> other, boolean negated)
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()other - restricted datatype to merge into thisnegated - true if other is negated,
false elseRestrictedDatatype, representing the intersection
of this and other{@link - IllegalArgumentException} if the primitive datatypes for
the ranges are not equalRestrictedDatatype<T> exclude(Collection<?> values)
values that are not contained in the restriction are
ignored.values - The values to excludeRestrictedDatatypeRestrictedDatatype<T> union(RestrictedDatatype<?> other)
getDatatype().getPrimitiveDatatype().equals( other.getDatatype.getPrimiveDatatype()other - restricted datatype to merge with thisRestrictedDatatype, representing the intersection
of this and other{@link - IllegalArgumentException} if the primitive datatypes for
the ranges are not equalCopyright © 2019. All rights reserved.