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 ExternalIdAbleImpl
clone()
Create a shallow copy of this entityString
getExternalId()
get external id of the entityString
getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml formatvoid
setExternalId(String externalId)
set the external idvoid
setXmlId(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:
getExternalId
in interfaceExternalIdAble
- Returns:
- external id
-
setExternalId
public void setExternalId(String externalId)
set the external id- Specified by:
setExternalId
in 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:
getXmlId
in interfaceExternalIdAble
- Returns:
- xmlId
-
setXmlId
public void setXmlId(String xmlId)
set the external id- Specified by:
setXmlId
in interfaceExternalIdAble
- Parameters:
xmlId
- to set
-
clone
public ExternalIdAbleImpl clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classIdAbleImpl
- Returns:
- shallow copy of entity
-
-