com.android.dx.rop.annotation
Class NameValuePair

java.lang.Object
  extended by 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 Summary
NameValuePair(CstString name, Constant value)
          Construct an instance.
 
Method Summary
 int compareTo(NameValuePair other)
          
 boolean equals(Object other)
          
 CstString getName()
          Gets the name.
 Constant getValue()
          Gets the value.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameValuePair

public NameValuePair(CstString name,
                     Constant value)
Construct an instance.

Parameters:
name - non-null; the name
value - non-null; the value
Method Detail

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


Copyright © 2015. All rights reserved.