Class SingleBound.Bound

java.lang.Object
org.opentrafficsim.base.parameters.constraint.SingleBound.Bound
Direct Known Subclasses:
SingleBound.LowerBoundExclusive, SingleBound.LowerBoundInclusive, SingleBound.UpperBoundExclusive, SingleBound.UpperBoundInclusive
Enclosing class:
SingleBound<T extends Number>

abstract static class SingleBound.Bound extends Object
Super class for classes that implement a specific numeric check.

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
  • Field Details

    • bound

      final Number bound
      Value of the bound.
    • classHashcode

      final int classHashcode
      Hashcode of the value class.
  • Constructor Details

    • Bound

      Bound(Number bound, String stringFormat)
      Constructor.
      Parameters:
      bound - Number; value of the bound
      stringFormat - String; string representation of this bound with %s for the value
  • Method Details

    • accept

      abstract boolean accept(Number value)
      Returns true if the bound accepts the value.
      Parameters:
      value - Number; the value to check
      Returns:
      true if the bound accepts the value
    • toString

      public final String toString()
      Overrides:
      toString in class Object