cz.cuni.utils.math.extended
Class Vertex2D

java.lang.Object
  extended by cz.cuni.utils.math.Tuple2D
      extended by cz.cuni.utils.math.extended.Vertex2D
All Implemented Interfaces:
java.lang.Cloneable

public class Vertex2D
extends Tuple2D

It differs from Tuple2D in the way, that xy shouldn't be changed after Vertex2D was created, because hash code was counted from them.


Field Summary
protected  int hashCode
          Hash code is counted upon creation of the object and is counted only from xyz[] ... don't change xyz[] afterwards!
 
Fields inherited from class cz.cuni.utils.math.Tuple2D
xy
 
Constructor Summary
Vertex2D(double[] iXY)
           
Vertex2D(double x, double y)
           
Vertex2D(Tuple2D tuple)
           
Vertex2D(Tuple2D tuple1, Tuple2D tuple2)
           
 
Method Summary
 java.lang.Object clone()
           
protected  int countHashCode()
           
 boolean equals(java.lang.Object o)
           
 boolean equals(Vertex2D vertex)
           
 int hashCode()
           
 
Methods inherited from class cz.cuni.utils.math.Tuple2D
abs, assign, assign, equals, equals, equals, getInverse, getNormalized, inverse, length, normalize, plus, plus, sqrLength, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hashCode

protected final int hashCode
Hash code is counted upon creation of the object and is counted only from xyz[] ... don't change xyz[] afterwards!

Constructor Detail

Vertex2D

public Vertex2D(double[] iXY)

Vertex2D

public Vertex2D(double x,
                double y)

Vertex2D

public Vertex2D(Tuple2D tuple)

Vertex2D

public Vertex2D(Tuple2D tuple1,
                Tuple2D tuple2)
Method Detail

clone

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

countHashCode

protected int countHashCode()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

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

equals

public boolean equals(Vertex2D vertex)