net.ajaest.jdk.data.auxi
Class KanjiStrokeClue

java.lang.Object
  extended by net.ajaest.lib.data.Pair<java.lang.Integer,java.lang.Integer>
      extended by net.ajaest.jdk.data.auxi.KanjiStrokeClue
All Implemented Interfaces:
java.io.Serializable, KanjiReference

public class KanjiStrokeClue
extends Pair<java.lang.Integer,java.lang.Integer>
implements KanjiReference, java.io.Serializable

Immutable class that stores a spatial relation between two strokes of a kanji.

Author:
Luis Alfonso Arce González
See Also:
Serialized Form

Field Summary
private  AllowedStrokePointEnum firstStrokePoint
           
private  AllowedStrokePointEnum secondStrokePoint
           
private static long serialVersionUID
           
private  AllowedStrokeClueEnum strokeClue
           
private  java.lang.Integer unicodeRef
           
 
Constructor Summary
KanjiStrokeClue(java.lang.Integer first, java.lang.Integer second, AllowedStrokePointEnum firstStrokePoint, AllowedStrokePointEnum secondStrokePoint, AllowedStrokeClueEnum strokeClue, java.lang.Integer unicodeRef)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 AllowedStrokePointEnum getFirstStrokePoint()
           
 AllowedStrokePointEnum getSecondStrokePoint()
           
 AllowedStrokeClueEnum getStrokeClue()
           
 java.lang.Integer getUnicodeRef()
           
 int hashCode()
           
 void setFirst(java.lang.Integer first)
          The object it's intended to be inmutable, so it will always throw UnsupportedOperationException
 void setSecond(java.lang.Integer second)
          The object it's intended to be inmutable, so it will always throw UnsupportedOperationException
 java.lang.String toString()
           
 
Methods inherited from class net.ajaest.lib.data.Pair
getFirst, getSecond
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

firstStrokePoint

private AllowedStrokePointEnum firstStrokePoint

secondStrokePoint

private AllowedStrokePointEnum secondStrokePoint

strokeClue

private AllowedStrokeClueEnum strokeClue

unicodeRef

private java.lang.Integer unicodeRef
Constructor Detail

KanjiStrokeClue

public KanjiStrokeClue(java.lang.Integer first,
                       java.lang.Integer second,
                       AllowedStrokePointEnum firstStrokePoint,
                       AllowedStrokePointEnum secondStrokePoint,
                       AllowedStrokeClueEnum strokeClue,
                       java.lang.Integer unicodeRef)
Parameters:
first - the order of the first stroke
second - the order of the second stroke
firstStrokePoint - the point of the first stroke where the relation is made
secondStrokePoint - the point of the second stroke where the relation is made
strokeClue - the relation between two strokes
unicodeRef - the unicode value of the referenced kanji
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Pair<java.lang.Integer,java.lang.Integer>

getFirstStrokePoint

public AllowedStrokePointEnum getFirstStrokePoint()
Returns:
The point of the first stroke where the relation is made

getSecondStrokePoint

public AllowedStrokePointEnum getSecondStrokePoint()
Returns:
The point of the second stroke where the relation is made

getStrokeClue

public AllowedStrokeClueEnum getStrokeClue()
Returns:
The relation between two strokes

getUnicodeRef

public java.lang.Integer getUnicodeRef()
Specified by:
getUnicodeRef in interface KanjiReference
Returns:
the unicode value of the referenced kanji.

hashCode

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

setFirst

public void setFirst(java.lang.Integer first)
The object it's intended to be inmutable, so it will always throw UnsupportedOperationException

Overrides:
setFirst in class Pair<java.lang.Integer,java.lang.Integer>
Throws:
java.lang.UnsupportedOperationException

setSecond

public void setSecond(java.lang.Integer second)
The object it's intended to be inmutable, so it will always throw UnsupportedOperationException

Overrides:
setSecond in class Pair<java.lang.Integer,java.lang.Integer>
Throws:
java.lang.UnsupportedOperationException

toString

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