类 FloatRange

java.lang.Object
org.openurp.base.util.FloatRange
所有已实现的接口:
org.beangle.commons.entity.Component

public class FloatRange extends Object implements org.beangle.commons.entity.Component
区间,默认两端都是闭区间
  • 构造器详细资料

    • FloatRange

      public FloatRange()

      Constructs a new FloatRange, which is [0, 0].

    • FloatRange

      public FloatRange(float number)

      Constructs a new FloatRange, which is [number, number].

      参数:
      number - the number to use for this range
      抛出:
      IllegalArgumentException - if the number is NaN
    • FloatRange

      public FloatRange(float min, float max)

      Constructs a new FloatRange with the specified minimum and maximum numbers (both inclusive).

      The arguments may be passed in the order (min,max) or (max,min). The getMinimum and getMaximum methods will return the correct values.

      参数:
      min - first number that defines the edge of the range, inclusive
      max - second number that defines the edge of the range, inclusive
      抛出:
      IllegalArgumentException - if either number is NaN
    • FloatRange

      public FloatRange(float min, boolean minInclusive, float max, boolean maxInclusive)
  • 方法详细资料

    • minInclusive

      public void minInclusive()
    • minExclusive

      public void minExclusive()
    • inclusive

      public void inclusive()
    • exclusive

      public void exclusive()
    • maxInclusive

      public void maxInclusive()
    • maxExclusive

      public void maxExclusive()
    • getMin

      public float getMin()
    • setMin

      public void setMin(float min)
    • isMinInclusive

      public boolean isMinInclusive()
    • setMinInclusive

      public void setMinInclusive(boolean minInclusive)
    • getMax

      public float getMax()
    • setMax

      public void setMax(float max)
    • isMaxInclusive

      public boolean isMaxInclusive()
    • setMaxInclusive

      public void setMaxInclusive(boolean maxInclusive)
    • containsFloat

      public boolean containsFloat(float value)
    • containsRange

      public boolean containsRange(FloatRange range)
    • overlapsRange

      public boolean overlapsRange(FloatRange range)
    • getDistance

      public float getDistance()
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object