Package com.luciad.shape
Class TLcdShapeListAnnotation
java.lang.Object
com.luciad.shape.TLcdShapeListAnnotation
- All Implemented Interfaces:
ILcdAnnotation
Provides information on the
ILcdShape
instances that can be contained
within a shape list.
If the instance class of a data type implements ILcdShapeList
, this annotation can be set
on the data type to provide information on which ILcdShape
instances are allowed
to be contained in the shape list implementation of instances of this data type.
For example, if a data type MyFeature
has instance class TLcdFeaturedShapeList
,
setting a TLcdShapeListAnnotation
annotation on this data type with shape classes
ILcdPoint
and ILcdPolyline
would indicate that only ILcdPoint
and
ILcdPolyline
instances may be stored as shapes in the shape list instances of
MyFeature
.
Note that this annotation is purely informative and that implementations of ILcdShapeList
are not required to enforce this constraint.-
Constructor Summary
ConstructorDescriptionTLcdShapeListAnnotation
(boolean aContainsSingleShape, Class<? extends ILcdShape>... aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes and the given value forcontainsSingleShape
.TLcdShapeListAnnotation
(boolean aContainsSingleShape, Set<Class<? extends ILcdShape>> aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes.TLcdShapeListAnnotation
(Class<? extends ILcdShape>... aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes.TLcdShapeListAnnotation
(Set<Class<? extends ILcdShape>> aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the shape list always contains at most a single shape.Returns the set of shape classes which are allowed as shapes on the shape list instances of this annotation's data type.
-
Constructor Details
-
TLcdShapeListAnnotation
Creates a newTLcdShapeListAnnotation
with the specified list of shape classes.containsSingleShape
is set tofalse
.- Parameters:
aShapeClasses
- the set of shape classes that is allowed as shape on the instances of this annotation's data type.
-
TLcdShapeListAnnotation
public TLcdShapeListAnnotation(boolean aContainsSingleShape, Set<Class<? extends ILcdShape>> aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes.- Parameters:
aShapeClasses
- the set of shape classes that is allowed as shape on the instances of this annotation's data type.
-
TLcdShapeListAnnotation
Creates a newTLcdShapeListAnnotation
with the specified list of shape classes.containsSingleShape
is set tofalse
.- Parameters:
aShapeClasses
- the shape classes that are allowed as shape on the instances of this annotation's data type.
-
TLcdShapeListAnnotation
public TLcdShapeListAnnotation(boolean aContainsSingleShape, Class<? extends ILcdShape>... aShapeClasses) Creates a newTLcdShapeListAnnotation
with the specified list of shape classes and the given value forcontainsSingleShape
.- Parameters:
aShapeClasses
- the shape classes that are allowed as shape on the instances of this annotation's data type.
-
-
Method Details
-
getShapeClasses
Returns the set of shape classes which are allowed as shapes on the shape list instances of this annotation's data type.- Returns:
- the set of shape classes which are allowed as shapes on the shape list instances of this annotation's data type.
-
containsSingleShape
public boolean containsSingleShape()Returns true if the shape list always contains at most a single shape. This is for instance the case for domain objects that have a single shape as geometry, but implementILcdShapeList
because that's a simpleILcdShape
interface to implement. Also, it allows the domain object to be used for many different shapes without having to implement other shape interfaces.- Returns:
- if the shape list contains at most a single shape
-