Class NameValuePair

java.lang.Object
com.android.dx.rop.annotation.NameValuePair
All Implemented Interfaces:
Comparable<NameValuePair>

public final class NameValuePair extends Object implements Comparable<NameValuePair>
A (name, value) pair. These are used as the contents of an annotation.
  • Constructor Details

    • NameValuePair

      public NameValuePair(CstString name, Constant value)
      Construct an instance.
      Parameters:
      name - non-null; the name
      value - non-null; the value
  • Method Details

    • toString

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

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

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(NameValuePair other)

      Instances of this class compare in name-major and value-minor order.

      Specified by:
      compareTo in interface Comparable<NameValuePair>
    • getName

      public CstString getName()
      Gets the name.
      Returns:
      non-null; the name
    • getValue

      public Constant getValue()
      Gets the value.
      Returns:
      non-null; the value