Package org.goplanit.utils.id
Interface IdAble
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
- All Known Subinterfaces:
ACyclicSubGraph
,Centroid
,Connectoid
,ConnectoidEdge
,ConnectoidSegment
,DirectedConnectoid
,DirectedEdge
,DirectedGraph<V,E,ES>
,DirectedGraphModificationEvent
,DirectedPath
,DirectedSubGraph
,DirectedVertex
,Edge
,EdgeSegment
,Event
,ExternalIdAble
,Graph<V,E>
,GraphEntity
,GraphModificationEvent
,Link
,LinkSegment
,MacroscopicLinkSegment
,MacroscopicLinkSegmentType
,MacroscopicNetworkLayer
,ManagedId
,Mode
,Node
,OdData<T>
,OdDemands
,OdHashed<T>
,OdMatrix<T,U>
,OdPaths
,OdZone
,PhysicalLayer
,PlanitComponentEvent
,PredefinedMode
,RemoveDirectedSubGraphListener
,RemoveSubGraphListener
,RoutedService
,RoutedServicesLayer
,RoutedTrip
,RoutedTripFrequency
,RoutedTripSchedule
,ServiceLeg
,ServiceLegSegment
,ServiceNetworkLayer
,ServiceNode
,TimePeriod
,TopologicalLayer
,TransferZone
,TransferZoneGroup
,TransportLayer
,UndirectedConnectoid
,UntypedDirectedGraph<V,E,ES>
,UntypedDirectedGraphLayer<V,E,S>
,UntypedGraph<V,E>
,UntypedPhysicalLayer<N,L,LS>
,Vertex
,Zone
,ZoningModificationEvent
- All Known Implementing Classes:
AbstractPhysicalCost
,AbstractVirtualCost
,ACyclicSubGraphImpl
,AlgorithmB
,BicycleMode
,BPRLinkTravelTimeCost
,BreakEdgeEvent
,BreakEdgeSegmentEvent
,Bush
,BusMode
,CarHighOccupancyMode
,CarMode
,CarShareMode
,CentroidImpl
,ConnectoidEdgeImpl
,ConnectoidImpl
,ConnectoidSegmentImpl
,CumulativeEvent
,Demands
,DirectedConnectoidImpl
,DirectedEdgeImpl
,DirectedGraphImpl
,DirectedPathImpl
,DirectedVertexImpl
,EdgeImpl
,EdgeSegmentImpl
,EventBasedLtm
,EventImpl
,ExternalIdAbleImpl
,FixedConnectoidTravelTimeCost
,FreeFlowLinkTravelTimeCost
,FundamentalDiagramComponent
,GapFunction
,GoodsMode
,GraphEntityImpl
,GraphImpl
,HeavyGoodsMode
,IdAbleImpl
,InitialLinkSegmentCost
,InitialPhysicalCost
,LargeHeavyGoodsMode
,LightRailMode
,LinkBasedRelativeDualityGapFunction
,LinkImpl
,LinkSegmentImpl
,LogitChoiceModel
,LtmAssignment
,MacroscopicLinkSegmentImpl
,MacroscopicLinkSegmentTypeImpl
,MacroscopicNetwork
,MacroscopicNetworkLayerImpl
,ManualInitialLinkSegmentCost
,ModeImpl
,ModifiedZoneIdsEvent
,MotorBikeMode
,MSASmoothing
,MultinomialLogit
,Network
,NetworkLoading
,NewellFundamentalDiagramComponent
,NodeImpl
,NodeModelComponent
,NormBasedGapFunction
,OdDataImpl
,OdDemandMatrix
,OdHashedImpl
,OdMatrixImpl
,OdNonPrimitiveMatrix
,OdPathMatrix
,OdPathSets
,OdPathsHashed
,OdPrimitiveMatrix
,OdSkimMatrix
,OdZoneImpl
,PathChoice
,PedestrianMode
,PlanitComponent
,PlanitOsmNetwork
,PopulateComponentEvent
,PopulateDemandsEvent
,PopulateFundamentalDiagramEvent
,PopulateGapFunctionEvent
,PopulateInitialLinkSegmentCostEvent
,PopulateNetworkEvent
,PopulatePhysicalCostEvent
,PopulateRoutedServicesEvent
,PopulateServiceNetworkEvent
,PopulateUntypedComponentEvent
,PopulateZoningEvent
,PredefinedModeImpl
,ReleaseEvent
,ReleaseFlowEvent
,RemoveSubGraphEdgeEvent
,RemoveSubGraphEdgeSegmentEvent
,RemoveSubGraphEvent
,RemoveSubGraphListenerImpl
,RemoveSubGraphVertexEvent
,RoutedServiceImpl
,RoutedServices
,RoutedServicesLayerImpl
,RoutedTripDeparture
,RoutedTripFrequencyImpl
,RoutedTripImpl
,RoutedTripScheduleImpl
,ServiceLegImpl
,ServiceLegSegmentImpl
,ServiceNetwork
,ServiceNetworkLayerImpl
,ServiceNodeImpl
,Smoothing
,SpeedConnectoidTravelTimeCost
,StaticLtm
,StaticTrafficAssignment
,SteadyStateTravelTimeCost
,StochasticPathChoice
,SubwayMode
,TampereNodeModelComponent
,TimePeriodImpl
,TopologicalLayerImpl
,TopologicalLayerNetwork
,TraditionalStaticAssignment
,TrafficAssignment
,TrainMode
,TramMode
,TransferZoneGroupImpl
,TransferZoneImpl
,TransportLayerImpl
,TransportLayerNetwork
,TravelerType
,TriggerEvent
,TriggerFlowEvent
,UndirectedConnectoidImpl
,UntypedDirectedGraphImpl
,UntypedGraphImpl
,UntypedNetworkLayerImpl
,UntypedPhysicalLayerImpl
,UntypedPhysicalNetwork
,UserClass
,VertexImpl
,VirtualNetwork
,ZoneImpl
,Zoning
public interface IdAble extends Comparable<IdAble>, Cloneable
A class implementing this interface signals that it is id-able- Author:
- markr
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IdAble
clone()
Create a shallow copy of this entitydefault int
compareTo(IdAble o)
Compare based on idstatic long
generateId(Class<?> classIdentifier, IdGroupingToken idtoken)
Convenience method to generate an id using a unique class identifier and idToken which in turn delegates to theIdGenerator.generateId()
long
getId()
Collect id of the entitydefault boolean
idEquals(Object o)
equals based on iddefault int
idHashCode()
Generate hash code based on id
-
-
-
Method Detail
-
generateId
static long generateId(Class<?> classIdentifier, IdGroupingToken idtoken)
Convenience method to generate an id using a unique class identifier and idToken which in turn delegates to theIdGenerator.generateId()
- Parameters:
classIdentifier
- to useidtoken
- to use- Returns:
- generated id
-
getId
long getId()
Collect id of the entity- Returns:
- id found
-
clone
IdAble clone()
Create a shallow copy of this entity- Returns:
- shallow copy of entity
-
idEquals
default boolean idEquals(Object o)
equals based on id- Parameters:
o
- object to compare id to- Returns:
- true when equal id, false otherwise
- See Also:
Comparable.compareTo(java.lang.Object)
-
idHashCode
default int idHashCode()
Generate hash code based on id- Returns:
- id based hash code
- See Also:
Comparable.compareTo(java.lang.Object)
-
compareTo
default int compareTo(IdAble o)
Compare based on id- Specified by:
compareTo
in interfaceComparable<IdAble>
- Parameters:
o
- object to compare id to- Returns:
- compare result identical to Long.compare
- See Also:
Comparable.compareTo(java.lang.Object)
-
-