public class Point<E> extends Object implements Serializable, Cloneable, Comparable<Point<E>>
| Constructor and Description |
|---|
Point(E[] values)
Initializes the point with the given values.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a clone of itself.
|
int |
compareTo(Point<E> obj)
Compares the given point with this point.
|
int |
dimensions()
Returns the number of dimensions this points uses.
|
boolean |
equals(Object obj)
Determines whether or not two points are equal.
|
E |
getValue(int dimension)
Returns the value in the specified dimension.
|
String |
toString()
returns a string representation of the Point.
|
public Point(E[] values)
values - the position in the various dimensionspublic Object clone()
public int dimensions()
public E getValue(int dimension)
dimension - the dimension to get the value forpublic boolean equals(Object obj)
public int compareTo(Point<E> obj)
compareTo in interface Comparable<Point<E>>obj - an object to be compared with this pointCopyright © 2017 University of Waikato, Hamilton, NZ. All Rights Reserved.