Package org.planit.utils.id
Interface Idable
-
- All Superinterfaces:
Comparable<Idable>
- All Known Subinterfaces:
Centroid,Connectoid,ConnectoidEdge,ConnectoidSegment,DirectedConnectoid,DirectedEdge,DirectedVertex,Edge,EdgeSegment,ExternalIdable,InfrastructureLayer,Link,LinkSegment,MacroscopicLinkSegment,MacroscopicLinkSegmentType,Mode,Node,OdZone,PredefinedMode,TransferZone,UndirectedConnectoid,Vertex,Zone
- All Known Implementing Classes:
AbstractPhysicalCost,AbstractVirtualCost,AlgorithmB,BicycleMode,BPRLinkTravelTimeCost,BusMode,CapacityConstrainedAssignment,CarHighOccupancyMode,CarMode,CarShareMode,CentroidImpl,ConnectoidEdgeImpl,ConnectoidImpl,ConnectoidSegmentImpl,Demands,DirectedConnectoidImpl,DirectedEdgeImpl,DirectedVertexImpl,DynamicTrafficAssignment,EdgeImpl,EdgeSegmentImpl,ELTM,ExternalIdAbleImpl,FixedConnectoidTravelTimeCost,FundamentalDiagram,GoodsMode,HeavyGoodsMode,InfrastructureLayerImpl,InfrastructureNetwork,InitialLinkSegmentCost,InitialLinkSegmentCostPeriod,InitialPhysicalCost,LargeHeavyGoodsMode,LightRailMode,LinkImpl,LinkSegmentImpl,LogitChoiceModel,MacroscopicLinkSegmentImpl,MacroscopicLinkSegmentTypeImpl,MacroscopicNetwork,MacroscopicPhysicalNetwork,ManualInitialLinkSegmentCost,ModeImpl,MotorBikeMode,MSASmoothing,MultinomialLogit,Network,NetworkLoading,NewellFundamentalDiagram,NodeImpl,NodeModel,ODPathSets,OdZoneImpl,PathChoice,PedestrianMode,PhysicalNetwork,PredefinedModeImpl,Smoothing,SpeedConnectoidTravelTimeCost,StaticTrafficAssignment,StochasticPathChoice,SubwayMode,TampereNodeModel,TimePeriod,TraditionalStaticAssignment,TrafficAssignment,TrafficAssignmentComponent,TrainMode,TramMode,TransferZoneImpl,TravelerType,UndirectedConnectoidImpl,UserClass,VertexImpl,VirtualNetwork,ZoneImpl,Zoning
public interface Idable extends Comparable<Idable>
A class implementing this interface signals that it is id-able TODO: refactor so that id becomes internal id, and xmlId becomes the defacto available id used to communicate with users- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompareTo(Idable o)Compare based on idlonggetId()collect id of the entitydefault booleanidEquals(Object o)equals based on iddefault intidHashCode()Generate hash code based on id
-
-
-
Method Detail
-
getId
long getId()
collect id of the entity- Returns:
- id
-
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:
compareToin interfaceComparable<Idable>- Parameters:
o- object to compare id to- Returns:
- compare result identical to Long.compare
- See Also:
Comparable.compareTo(java.lang.Object)
-
-