java.lang.Object
com.ibm.wala.analysis.arraybounds.hypergraph.weight.Weight

public class Weight extends Object
A weight may be not set, a number or unlimited, note that the meaning of unlimited is given by the chosen order (see NormalOrder and ReverseOrder).
Author:
Stephan Gocht <stephan@gobro.de>
  • Field Details

    • UNLIMITED

      public static final Weight UNLIMITED
    • NOT_SET

      public static final Weight NOT_SET
    • ZERO

      public static final Weight ZERO
  • Constructor Details

    • Weight

      public Weight(int number)
    • Weight

      public Weight(Weight.Type type, int number)
  • Method Details

    • add

      public Weight add(Weight other)
      Returns this + other. If this is not Number this will be returned, if other is not number other will be returned
      Returns:
      this + other
    • equals

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

      public int getNumber()
    • getType

      public Weight.Type getType()
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object