public class Point<N extends java.lang.Number>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Point(N... coords)
Creates a new instance of Point with given coordinates
|
Modifier and Type | Method and Description |
---|---|
N |
get(int dimension)
Retrieve the value of a specific coordinate of this point
|
int |
getDimensions()
Retrieve the actual coordinations of this point
|
public Point(N... coords)
coords
- The coordinates given as a list of native (or boxed) type
numbers.public N get(int dimension) throws java.lang.ArrayIndexOutOfBoundsException
dimension
- the coordination dimensionjava.lang.ArrayIndexOutOfBoundsException
- The coordination
required is not presentpublic int getDimensions()