All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gpsys.cos.Vector2Mod10

java.lang.Object
   |
   +----gpsys.cos.Vector2Mod10

public class Vector2Mod10
extends Object
implements Serializable
The Vector2Mod10 type is a 2 element vector consisting of numbers in the range 0 to 9. The modulo 10 arithmetic is used to guarantee that the elements stay in this range.

Author:
Emmanuel PIERRE
DEA IARFA,

Variable Index

 o x
The first element of the vector.
 o y
The second element of the vector.
 o Zero
The zero Vector2Mod10 (0,0).

Constructor Index

 o Vector2Mod10(int, int)
Construct a new Vector2Mod10 object with the elements initialised to the specified values.

Method Index

 o add(Vector2Mod10, Vector2Mod10)
Construct a new Vector2Mod10 object which is the sum of the specified Vector2Mod10 objects.
 o toString()
Creates a String representing this Vector2Mod10 object.

Variables

 o x
 int x
The first element of the vector.

 o y
 int y
The second element of the vector.

 o Zero
 public static final Vector2Mod10 Zero
The zero Vector2Mod10 (0,0).

Constructors

 o Vector2Mod10
 public Vector2Mod10(int x,
                     int y)
Construct a new Vector2Mod10 object with the elements initialised to the specified values. Modulo 10 arithmetic is used to ensure that the elements are in the range 0 to 9.

Parameters:
x - The first element of the Vector.
x - The second element of the Vector.

Methods

 o add
 public static final Vector2Mod10 add(Vector2Mod10 v1,
                                      Vector2Mod10 v2)
Construct a new Vector2Mod10 object which is the sum of the specified Vector2Mod10 objects. Modulo 10 arithmetic is used to ensure that the elements are in the range 0 to 9.

Parameters:
v1 - The first Vector2Mod10 object.
v2 - The second Vector2Mod10 object.
 o toString
 public String toString()
Creates a String representing this Vector2Mod10 object.

Returns:
A String representing this object.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index