jfreerails.world.common
Class ImInts
java.lang.Object
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
|
Constructor Summary |
ImInts(int... i)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
ints
private final int[] ints
ImInts
public ImInts(int... i)
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.