rlgamekit.item
Class Triplet

java.lang.Object
  extended by rlgamekit.item.Triplet

public class Triplet
extends java.lang.Object

A group of three integer values. Triplets are immutable values.


Constructor Summary
Triplet()
           
Triplet(java.io.BufferedReader reader)
           
Triplet(int v1, int v2, int v3)
           
 
Method Summary
 int get(int i)
          Get value no. i.
 void read(java.io.BufferedReader reader)
           
 java.lang.String toString()
           
 void write(java.io.Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Triplet

public Triplet()

Triplet

public Triplet(java.io.BufferedReader reader)
        throws java.io.IOException
Throws:
java.io.IOException

Triplet

public Triplet(int v1,
               int v2,
               int v3)
Method Detail

get

public int get(int i)
Get value no. i. I must be in [0...2]

Parameters:
i - Index of the value to get
Returns:
The value at index i.

write

public void write(java.io.Writer writer)
           throws java.io.IOException
Throws:
java.io.IOException

read

public void read(java.io.BufferedReader reader)
          throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object