Package overit.geocall.util
Class PrimitiveArray
java.lang.Object
overit.geocall.util.PrimitiveArray
Utility class used to box primitive-types inside an array.
Changes in the given array will be visible in the returned list, and vice versa.
The list does not allow for structural modifications, meaning
that it is not possible to change the size of the list.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasList(boolean modifiable, boolean... array) Returns a view on the given array, as a list of boxedBooleanChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, byte... array) Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, char... array) Returns a view on the given array, as a list of boxedCharacterChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, double... array) Returns a view on the given array, as a list of boxedFloatChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, float... array) Returns a view on the given array, as a list of boxedFloatChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, int... array) Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, long... array) Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa.asList(boolean modifiable, short... array) Returns a view on the given array, as a list of boxedShortChanges in the given array will be visible in the returned list, and vice versa.static ListReturns a view on the given array of primitive-tyes, as a list of boxed primitive-types.
-
Constructor Details
-
PrimitiveArray
public PrimitiveArray()
-
-
Method Details
-
asList
Returns a view on the given array of primitive-tyes, as a list of boxed primitive-types. Changes in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listprimitiveArray- The primitive array. Only,invalid reference
int,invalid reference
long,invalid reference
float,invalid reference
double,invalid reference
char,invalid reference
booleanare accepted. The array cannot be null. If something is passed different thanan array of a primitive-type, than an assertion exception is thrown.invalid reference
short- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedShortChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-truefor obtaining a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedLongChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedFloatChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedFloatChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedCharacterChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-
asList
Returns a view on the given array, as a list of boxedBooleanChanges in the given array will be visible in the returned list, and vice versa. The list does not allow for structural modifications, meaning that it is not possible to change the size of the list.- Parameters:
modifiable-trueto obtain a modifiable list,falsefor an unomdifiable listarray- The array- Returns:
- The list view
-