FileDocCategorySizeDatePackage
LocalTestNode.javaAPI DocApache Poi 3.0.12895Mon Jan 01 12:39:46 GMT 2007org.apache.poi.util

LocalTestNode

public class LocalTestNode extends Object implements Comparable

Fields Summary
private Comparable
_key
private Comparable
_value
Constructors Summary
LocalTestNode(int key)
construct a LocalTestNode

param
key value used to create the key and value

        _key   = new Integer(key);
        _value = String.valueOf(key);
    
Methods Summary
public intcompareTo(java.lang.Object o)
Method compareTo

param
o
return

        LocalTestNode other = ( LocalTestNode ) o;
        int           rval  = getKey().compareTo(other.getKey());

        if (rval == 0)
        {
            rval = getValue().compareTo(other.getValue());
        }
        return rval;
    
public booleanequals(java.lang.Object o)
Method equals

param
o
return
true if equal

        if (o == null)
        {
            return false;
        }
        if (!(o.getClass().equals(this.getClass())))
        {
            return false;
        }
        LocalTestNode node = ( LocalTestNode ) o;

        return (getKey().equals(node.getKey())
                && getValue().equals(node.getValue()));
    
java.lang.ComparablegetKey()

return
the unique key associated with the current node

        return _key;
    
java.lang.ComparablegetValue()

return
the unique value associated with the current node

        return _value;
    
public inthashCode()

return
hash code

        return getKey().hashCode() ^ getValue().hashCode();
    
voidsetKey(java.lang.Comparable key)

param
key the unique key associated with the current node.

        _key = key;
    
voidsetValue(java.lang.Comparable value)

param
value the unique value associated with the current node.

        _value = value;