com.endeca.edf.adapter
Class PVal

java.lang.Object
  extended by com.endeca.edf.adapter.PVal
All Implemented Interfaces:
java.lang.Comparable<PVal>

public class PVal
extends java.lang.Object
implements java.lang.Comparable<PVal>

A name-value pair, a collection of which constitutes a Record.


Constructor Summary
PVal(java.lang.String name, java.lang.String value)
          Constructs a PVal from a name and a value.
 
Method Summary
 int compareTo(PVal other)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
          Gets the name of this PVal.
 java.lang.String getValue()
          Gets the value of this PVal.
 int hashCode()
           
 void setName(java.lang.String name)
          Sets the name of this PVal.
 void setValue(java.lang.String value)
          Sets the value of this PVal.
 java.lang.String toString()
          String representation of this PVal.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PVal

public PVal(java.lang.String name,
            java.lang.String value)
Constructs a PVal from a name and a value.

Parameters:
name - the name given to this PVal.
value - the value given to this PVal.
Throws:
java.lang.IllegalArgumentException - if name is null
Method Detail

getName

public java.lang.String getName()
Gets the name of this PVal.

Returns:
the name of this PVal.

setName

public void setName(java.lang.String name)
Sets the name of this PVal.

Parameters:
name - the name assigned to this PVal.
Throws:
java.lang.IllegalArgumentException - if name is null

getValue

public java.lang.String getValue()
Gets the value of this PVal.

Returns:
the value of this PVal.

setValue

public void setValue(java.lang.String value)
Sets the value of this PVal.

Parameters:
value - the value assigned to this PVal.

toString

public java.lang.String toString()
String representation of this PVal. The string returned is of the form:
name=value.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of this PVal.

compareTo

public int compareTo(PVal other)
Specified by:
compareTo in interface java.lang.Comparable<PVal>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


2003, 2012 Oracle and/or its affiliates. All rights reserved.
Oracle and/or its affiliates Confidential