weka.core.setupgenerator
Class Point<E>

java.lang.Object
  extended by weka.core.setupgenerator.Point<E>
All Implemented Interfaces:
Serializable, Cloneable

public class Point<E>
extends Object
implements Serializable, Cloneable

A multi-dimensional point.

Version:
$Revision: 4521 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  Object[] m_Values
          the values in the various dimensions.
 
Constructor Summary
Point(E[] values)
          Initializes the point with the given values.
 
Method Summary
 Object clone()
          Returns a clone of itself.
 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.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Values

protected Object[] m_Values
the values in the various dimensions.

Constructor Detail

Point

public Point(E[] values)
Initializes the point with the given values.

Parameters:
values - the position in the various dimensions
Method Detail

clone

public Object clone()
Returns a clone of itself.

Overrides:
clone in class Object
Returns:
a clone of itself

dimensions

public int dimensions()
Returns the number of dimensions this points uses.

Returns:
the number of dimensions

getValue

public E getValue(int dimension)
Returns the value in the specified dimension.

Parameters:
dimension - the dimension to get the value for
Returns:
the value

equals

public boolean equals(Object obj)
Determines whether or not two points are equal.

Overrides:
equals in class Object
Parameters:
obj - an object to be compared with this PointDouble
Returns:
true if the object to be compared has the same values; false otherwise.

toString

public String toString()
returns a string representation of the Point.

Overrides:
toString in class Object
Returns:
the point as string


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.