jInfer

cz.cuni.mff.ksi.jinfer.iss.objects
Class Triplet

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.iss.objects.Triplet
All Implemented Interfaces:
Comparable<Triplet>

public class Triplet
extends Object
implements Comparable<Triplet>

A class representing the triplet (element name, attribute name, attribute value) for use in attribute mapping.


Constructor Summary
Triplet(String element, String attribute, String value)
          Full constructor.
 
Method Summary
 int compareTo(Triplet o)
          Compares to another Triplet.
 boolean equals(Object obj)
           
 String getAttribute()
           
 String getElement()
           
 String getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Triplet

public Triplet(String element,
               String attribute,
               String value)
Full constructor.

Parameters:
element - Element name.
attribute - Attribute name.
value - Attribute value.
Method Detail

getElement

public String getElement()

getAttribute

public String getAttribute()

getValue

public String getValue()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Triplet o)
Compares to another Triplet. First of all, null is supposed to be the last. Second, the comparison is done first on element name, then on attribute name (it is assumed that the pair (element name, attribute name) is a unique key).

Specified by:
compareTo in interface Comparable<Triplet>
Parameters:
o - The other Triplet to be compared. May be null.
Returns:

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011