Class ConstantSupplier<O>

java.lang.Object
org.opentrafficsim.core.distributions.ConstantSupplier<O>
Type Parameters:
O - type of the object returned by the draw method
All Implemented Interfaces:
Supplier<O>
Direct Known Subclasses:
FixedRouteGenerator

public class ConstantSupplier<O> extends Object implements Supplier<O>
Supplier implementation for a constant value.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • ConstantSupplier

      public ConstantSupplier(O value)
      Constructor.
      Parameters:
      value - value
  • Method Details

    • get

      public O get()
      Specified by:
      get in interface Supplier<O>
    • getValue

      public O getValue()
      Returns the value.
      Returns:
      value
    • toString

      public String toString()
      Overrides:
      toString in class Object