Class UnitData

java.lang.Object
org.eclipse.mosaic.lib.objects.UnitData
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AgentData, ChargingStationData, InductionLoopInfo, LaneAreaDetectorInfo, VehicleData

@Immutable public abstract class UnitData extends Object implements Serializable
General unit data container for e.g. position, time etc.
See Also:
  • Constructor Details

    • UnitData

      public UnitData(long time, String name, GeoPoint position)
      Creates a new UnitData.
      Parameters:
      time - time of the last update
      name - name of the unit
      position - position of the unit
  • Method Details

    • getTime

      public long getTime()
      Getter for the time of the last update.
      Returns:
      Time of the last update
      See Also:
      • time
    • getName

      public String getName()
      Returns the unique string identifying the unit.
      See Also:
      • name
    • getPosition

      public GeoPoint getPosition()
      Returns the current geographical position of the unit.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object