View Javadoc
1   package org.opentrafficsim.animation.data;
2   
3   import org.djunits.value.vdouble.scalar.Speed;
4   import org.opentrafficsim.draw.road.SpeedSignAnimation.SpeedSignData;
5   import org.opentrafficsim.road.network.lane.object.SpeedSign;
6   
7   /**
8    * Animation data of a SpeedSign.
9    * <p>
10   * Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
11   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
12   * </p>
13   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
14   */
15  public class AnimationSpeedSignData extends AnimationIdentifiableShape<SpeedSign> implements SpeedSignData
16  {
17  
18      /**
19       * Constructor.
20       * @param speedSign speed sign.
21       */
22      public AnimationSpeedSignData(final SpeedSign speedSign)
23      {
24          super(speedSign);
25      }
26  
27      @Override
28      public Speed getSpeed()
29      {
30          return getObject().getSpeed();
31      }
32  
33      @Override
34      public String toString()
35      {
36          return "Speed sign " + getId();
37      }
38  
39  }