cc.redberry.core.utils
Class IntArray
- java.lang.Object
-
- cc.redberry.core.utils.IntArray
-
public final class IntArray extends java.lang.ObjectImmutable integer array. This class is a simple wrapper of generic array of integers.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field and Description static IntArrayEMPTY_ARRAY
-
Constructor Summary
Constructors Constructor and Description IntArray(int[] innerArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int[]copy()This method returns new integer generic array, with copy of thisIntArraydata.int[]copy(int from, int to)This method returns new integer generic array, with copy of thisIntArraydata.booleanequals(java.lang.Object obj)booleanequalsToArray(int[] array)intget(int i)Returns the integer at the specified position in thisIntArray.inthashCode()intlength()Returns number of elements in thisIntArrayjava.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final IntArray EMPTY_ARRAY
-
-
Constructor Detail
-
IntArray
public IntArray(int[] innerArray)
- Parameters:
innerArray- generic integer array to be wrapped
-
-
Method Detail
-
get
public int get(int i)
Returns the integer at the specified position in thisIntArray.- Parameters:
i- position of the integer to return- Returns:
- the integer at the specified position in this
Indices
-
length
public int length()
Returns number of elements in thisIntArray- Returns:
- number of elements in this array
-
copy
public int[] copy()
This method returns new integer generic array, with copy of thisIntArraydata.- Returns:
- integer generic array, with copy of this
IntArraydata
-
copy
public int[] copy(int from, int to)This method returns new integer generic array, with copy of thisIntArraydata.- Returns:
- integer generic array, with copy of this
IntArraydata
-
equalsToArray
public boolean equalsToArray(int[] array)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG