jfreerails.world.common
Class ImInts

java.lang.Object
  extended by jfreerails.world.common.ImInts
All Implemented Interfaces:
java.io.Serializable, FreerailsSerializable

public class ImInts
extends java.lang.Object
implements FreerailsSerializable

An immutable list of ints.

Author:
Luke
See Also:
Serialized Form

Field Summary
private  int[] ints
           
private static long serialVersionUID
           
 
Constructor Summary
ImInts(int... i)
           
 
Method Summary
 ImInts append(int... extra)
           
 boolean equals(java.lang.Object o)
           
static ImInts fromBoolean(boolean... i)
           
 int get(int i)
           
 int hashCode()
           
 ImInts removeLast()
           
 int size()
           
 int sum()
          Returns the sum of the ints stored in the list.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

ints

private final int[] ints
Constructor Detail

ImInts

public ImInts(int... i)
Method Detail

fromBoolean

public static ImInts fromBoolean(boolean... i)

size

public int size()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

get

public int get(int i)

removeLast

public ImInts removeLast()

append

public ImInts append(int... extra)

toString

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

sum

public int sum()
Returns the sum of the ints stored in the list.