Package com.luciad.ais.model.route
Class TLcdRouteSegment
java.lang.Object
com.luciad.ais.model.route.TLcdRouteSegment
- All Implemented Interfaces:
ILcdEditableRouteSegment,ILcdRouteSegment,ILcdDataObject,ILcdPointList,Serializable,Cloneable
- Direct Known Subclasses:
TLcdFeaturedRouteSegment
An implementation of
ILcdRouteSegment.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TLcdDataPropertyThe BeginPoint property of the route segment type.static final TLcdDataPropertyThe EndPoint property of the route segment type.static final TLcdDataPropertyThe SequenceNumber property of the route segment type. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.TLcdRouteSegment(TLcdRouteSegment aRouteSegment) Copy constructor.TLcdRouteSegment(TLcdDataType aDataType) Creates a new instance for the given type. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone of thisTLcdRouteSegmentobject.Returns the first point of this route segment.Returns the type of this data object.Returns the second point of this route segment.getPoint(int i) Returns theILcdPointat a given index.intReturns 2 for a valid route segment with both a begin and end point, 0 otherwise.intReturns the segment number of this route segment.getValue(TLcdDataProperty aProperty) Returns the value of the given property.Convenience method that returns the value of the property with the given name.booleanhasValue(TLcdDataProperty aProperty) Indicates whether this data object has a value for the given property.booleanIndicates whether this data object has a value for the given property.voidsetBeginPoint(ILcdPoint aBeginPoint) Specifies the begin point of this route segment.voidsetEndPoint(ILcdPoint aEndPoint) Specifies the end point for this route segment.voidsetSequenceNumber(int aSequenceNumber) Specifies the segment number of this route segment.voidsetValue(TLcdDataProperty aProperty, Object aValue) Sets the value of the given property for this data object.voidConvenience method that sets the value of the property with the given name.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.shape.ILcdPointList
getPointSFCT, getX, getY, getZ
-
Field Details
-
BEGIN_POINT_PROPERTY
The BeginPoint property of the route segment type. Values of this property are of typeILcdPoint. -
END_POINT_PROPERTY
The EndPoint property of the route segment type. Values of this property are of typeILcdPoint. -
SEQUENCE_NUMBER_PROPERTY
The SequenceNumber property of the route segment type. Values of this property are of typeInteger.
-
-
Constructor Details
-
TLcdRouteSegment
Deprecated.Constructs a newTLcdRouteSegmentstarting at the given begin point and ending at the given end point. -
TLcdRouteSegment
Copy constructor. The begin and end point are copied usingcloneAs3DEditablePoint().- Parameters:
aRouteSegment- the routeSegment to be copied into a new object
-
TLcdRouteSegment
Creates a new instance for the given type.- Parameters:
aDataType- the data type of the returned instance- Throws:
IllegalArgumentException- ifTLcdAISDataTypes.RouteSegmentis not assignable from the given data type- Since:
- 10.1
-
-
Method Details
-
getDataType
Description copied from interface:ILcdDataObjectReturns the type of this data object. This can never benull.- Specified by:
getDataTypein interfaceILcdDataObject- Returns:
- the type of this data object
-
getValue
Description copied from interface:ILcdDataObjectReturns the value of the given property.
If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).
The property must not be null, and must be declared in the
data object's typeor in one of its super types. Otherwise anIllegalArgumentExceptionis thrown.- Specified by:
getValuein interfaceILcdDataObject- Parameters:
aProperty- the property for which the value is to be returned- Returns:
- the value of the given property for this data object
-
getValue
Description copied from interface:ILcdDataObjectConvenience method that returns the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.getValue(TLcdDataProperty)for more information.- Specified by:
getValuein interfaceILcdDataObject- Parameters:
aPropertyName- the name of the property of which the value is to be returned- Returns:
- the value of the property with the given name
- See Also:
-
setValue
Description copied from interface:ILcdDataObjectSets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's typeor in one of its super types. In other words, getDataType().getProperties().contains( aProperty ) should always be true. Otherwise, the implementation should throw anIllegalArgumentException.- Specified by:
setValuein interfaceILcdDataObject- Parameters:
aProperty- the property for which the value is to be setaValue- the value to set- See Also:
-
setValue
Description copied from interface:ILcdDataObjectConvenience method that sets the value of the property with the given name.
If more than one property exists with the given name, the most specific property should be used (this is the property defined by the most specialized type in this object's data type hierarchy). SeeILcdDataObject.setValue(TLcdDataProperty, Object)for more information.- Specified by:
setValuein interfaceILcdDataObject- Parameters:
aPropertyName- the name of the property of which the value is to be setaValue- the value to set
-
hasValue
Description copied from interface:ILcdDataObjectIndicates whether this data object has a value for the given property.aPropertyis from theright data type, and this instance has a value for it: returnstrueaPropertyis from theright data type, and this instance has no value for it: returnsfalseaPropertyis not from theright data type: not allowed, you will get IllegalArgumentExceptionaPropertyisnull: not allowed, you will get NullPointerException
- Specified by:
hasValuein interfaceILcdDataObject- Parameters:
aProperty- the property for which to return whether a value is present or not.- Returns:
trueif this data object has a value for the given property,falseotherwise.
-
hasValue
Description copied from interface:ILcdDataObjectIndicates whether this data object has a value for the given property.
SeeILcdDataObject.hasValue(TLcdDataProperty)for more information.- Specified by:
hasValuein interfaceILcdDataObject- Parameters:
aPropertyName- the name of the property for which to return whether a value is present or not.- Returns:
trueif this data object has a value for the property with the given name,falseotherwise.
-
setSequenceNumber
public void setSequenceNumber(int aSequenceNumber) Description copied from interface:ILcdEditableRouteSegmentSpecifies the segment number of this route segment.- Specified by:
setSequenceNumberin interfaceILcdEditableRouteSegment- Parameters:
aSequenceNumber-
-
setBeginPoint
Description copied from interface:ILcdEditableRouteSegmentSpecifies the begin point of this route segment.- Specified by:
setBeginPointin interfaceILcdEditableRouteSegment- Parameters:
aBeginPoint-
-
setEndPoint
Description copied from interface:ILcdEditableRouteSegmentSpecifies the end point for this route segment.- Specified by:
setEndPointin interfaceILcdEditableRouteSegment- Parameters:
aEndPoint-
-
getSequenceNumber
public int getSequenceNumber()Description copied from interface:ILcdRouteSegmentReturns the segment number of this route segment.- Specified by:
getSequenceNumberin interfaceILcdRouteSegment- Returns:
- the segment number of this route segment.
-
getBeginPoint
Description copied from interface:ILcdRouteSegmentReturns the first point of this route segment.- Specified by:
getBeginPointin interfaceILcdRouteSegment- Returns:
- the first point of this route segment.
-
getEndPoint
Description copied from interface:ILcdRouteSegmentReturns the second point of this route segment.- Specified by:
getEndPointin interfaceILcdRouteSegment- Returns:
- the second point of this route segment.
-
getPointCount
public int getPointCount()Returns 2 for a valid route segment with both a begin and end point, 0 otherwise.- Specified by:
getPointCountin interfaceILcdPointList- Returns:
- 2 for a valid route segment with both a begin and end point, 0 otherwise.
-
getPoint
Description copied from interface:ILcdPointListReturns theILcdPointat a given index.- Specified by:
getPointin interfaceILcdPointList- Parameters:
i- a valid index in the list ofILcdPointobjects.- Returns:
- the
ILcdPointat the given index. - Throws:
IndexOutOfBoundsException- if the given index is out of bounds.
-
clone
Returns a clone of thisTLcdRouteSegmentobject. Note: the begin point and end point of the new object are a clone of the begin and end point of this object. Other features are a shallow clone.- Specified by:
clonein interfaceILcdRouteSegment- Overrides:
clonein classObject- Returns:
- a clone of this
TLcdRouteSegmentobject.
-
TLcdRouteSegment(TLcdDataType)