Class PointImpl
java.lang.Object
de.wwu.scdh.annotation.selection.point.PointImpl
- All Implemented Interfaces:
Point
- Direct Known Subclasses:
RFC5147CharScheme,XPathRefinedByRFC5147CharScheme
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the components of the point as aSet.<T,C extends Component<T>>
TgetComponent(Class<C> component) Returns the value of the requested component in a type-safe manner.<C extends Component<?>>
booleanhasComponent(Class<C> component) A predicate, that returns True if and only if the point has the component of the given type.intsize()Returns the number of components.
-
Constructor Details
-
Method Details
-
hasComponent
A predicate, that returns True if and only if the point has the component of the given type.- Specified by:
hasComponentin interfacePoint- Parameters:
component- the component asClass
-
size
public int size()Returns the number of components. -
dimensions
Returns the components of the point as aSet.- Specified by:
dimensionsin interfacePoint
-
getComponent
public <T,C extends Component<T>> T getComponent(Class<C> component) throws NoSuchComponentException Returns the value of the requested component in a type-safe manner. If the component is not present or if the value does not match the components type, aNoSuchComponentExceptionis thrown.- Specified by:
getComponentin interfacePoint- Parameters:
component- the requested component asClass- Returns:
- the value of the component in its type T
- Throws:
NoSuchComponentException
-