Class Weighing.WeightObj<T>

java.lang.Object
org.aoju.bus.core.lang.Weighing.WeightObj<T>
Type Parameters:
T - 对象类型
Enclosing class:
Weighing<T>

public static class Weighing.WeightObj<T> extends Object
带有权重的对象包装
  • Constructor Details

    • WeightObj

      public WeightObj(T obj, double weight)
      构造
      Parameters:
      obj - 对象
      weight - 权重
  • Method Details

    • getObj

      public T getObj()
      获取对象
      Returns:
      对象
    • setObj

      public void setObj(T obj)
      设置对象
      Parameters:
      obj - 对象
    • getWeight

      public double getWeight()
      获取权重
      Returns:
      权重
    • hashCode

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

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