Package org.goplanit.utils.id
Class ExternalIdAbleImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- All Implemented Interfaces:
Cloneable,Comparable<IdAble>,ExternalIdAble,IdAble
- Direct Known Subclasses:
ConnectoidImpl,DirectedPathImpl,GraphEntityImpl,MacroscopicLinkSegmentTypeImpl,ModeImpl,RoutedServiceImpl,RoutedServicesLayerImpl,RoutedTripDeparture,RoutedTripImpl,TimePeriodImpl,TransferZoneGroupImpl,TransportLayerImpl,TravelerType,UserClass,ZoneImpl
public class ExternalIdAbleImpl extends IdAbleImpl implements ExternalIdAble
Implementation of ExternalIdable interface including hash and equals based on id- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description ExternalIdAbleImpl(long id)ConstructorExternalIdAbleImpl(ExternalIdAbleImpl other)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalIdAbleImplclone()Create a shallow copy of this entityStringgetExternalId()get external id of the entityStringgetXmlId()the id exposed to users as the "normal" id in the PLANit native xml formatvoidsetExternalId(String externalId)set the external idvoidsetXmlId(String xmlId)set the external id-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
ExternalIdAbleImpl
public ExternalIdAbleImpl(long id)
Constructor- Parameters:
id- to use
-
ExternalIdAbleImpl
public ExternalIdAbleImpl(ExternalIdAbleImpl other)
Copy constructor- Parameters:
other- to copy from
-
-
Method Detail
-
getExternalId
public String getExternalId()
get external id of the entity- Specified by:
getExternalIdin interfaceExternalIdAble- Returns:
- external id
-
setExternalId
public void setExternalId(String externalId)
set the external id- Specified by:
setExternalIdin interfaceExternalIdAble- Parameters:
externalId- to set
-
getXmlId
public String getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml format- Specified by:
getXmlIdin interfaceExternalIdAble- Returns:
- xmlId
-
setXmlId
public void setXmlId(String xmlId)
set the external id- Specified by:
setXmlIdin interfaceExternalIdAble- Parameters:
xmlId- to set
-
clone
public ExternalIdAbleImpl clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classIdAbleImpl- Returns:
- shallow copy of entity
-
-