de.hpi.fgis.voidgen.hadoop.datatypes
Class SPCntTriple
java.lang.Object
de.hpi.fgis.voidgen.hadoop.datatypes.Pair<Pair<java.lang.String,java.lang.String>,java.lang.Integer>
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
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. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
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 Stringpred
- predicate Stringcnt
- count
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 partpred
- the second partcnt
- 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