de.hpi.fgis.voidgen.hadoop.datatypes
Class SPCntTriple

java.lang.Object
  extended by de.hpi.fgis.voidgen.hadoop.datatypes.Pair<Pair<java.lang.String,java.lang.String>,java.lang.Integer>
      extended by de.hpi.fgis.voidgen.hadoop.datatypes.SPCntTriple
All Implemented Interfaces:
java.lang.Comparable<SPCntTriple>, org.apache.hadoop.io.Writable, org.apache.hadoop.io.WritableComparable<SPCntTriple>

public class SPCntTriple
extends Pair<Pair<java.lang.String,java.lang.String>,java.lang.Integer>
implements org.apache.hadoop.io.WritableComparable<SPCntTriple>

Represents a triple of subject, predicate and a count.

Author:
Dandy Fenz, Hasso Plattner Institute at University of Potsdam, Germany, Matthias Pohl, Hasso Plattner Institute at University of Potsdam, Germany, Johannes Gosda, Hasso Plattner Institute at University of Potsdam, Germany

Field Summary
 
Fields inherited from class de.hpi.fgis.voidgen.hadoop.datatypes.Pair
left, right
 
Constructor Summary
SPCntTriple()
          Default constructor.
SPCntTriple(java.lang.String sub, java.lang.String pred, int cnt)
          Constructor setting all parts of the triples.
 
Method Summary
 SPCntTriple clone()
           
 int compareTo(SPCntTriple triple)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getV1()
           
 java.lang.String getV2()
           
 int getV3()
           
 int hashCode()
           
 void readFields(java.io.DataInput in)
           
 void set(java.lang.String sub, java.lang.String pred, int cnt)
          Sets all parts of the triple.
 java.lang.String toString()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class de.hpi.fgis.voidgen.hadoop.datatypes.Pair
getLeft, getRight, setLeft, setRight
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SPCntTriple

public SPCntTriple()
Default constructor.


SPCntTriple

public SPCntTriple(java.lang.String sub,
                   java.lang.String pred,
                   int cnt)
Constructor setting all parts of the triples.

Parameters:
sub - subject String
pred - predicate String
cnt - count
Method Detail

readFields

public void readFields(java.io.DataInput in)
                throws java.io.IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
java.io.IOException

getV1

public java.lang.String getV1()
Returns:
the first part of the triple.

getV2

public java.lang.String getV2()
Returns:
the second part of the triple.

getV3

public int getV3()
Returns:
the third part of the triple.

set

public void set(java.lang.String sub,
                java.lang.String pred,
                int cnt)
Sets all parts of the triple.

Parameters:
sub - the first part
pred - the second part
cnt - the third part

equals

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

compareTo

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

hashCode

public int hashCode()
Overrides:
hashCode in class Pair<Pair<java.lang.String,java.lang.String>,java.lang.Integer>

toString

public java.lang.String toString()
Overrides:
toString in class Pair<Pair<java.lang.String,java.lang.String>,java.lang.Integer>

clone

public SPCntTriple clone()
Overrides:
clone in class java.lang.Object