Package org.yamcs.studio.data.vtype
Class CollectionNumbers
java.lang.Object
org.yamcs.studio.data.vtype.CollectionNumbers
Utilities to work with number collections.
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Copies the content of the collection to an array.static byte[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static double[]
Copies the content of the collection to an array.static double[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static float[]
Copies the content of the collection to an array.static float[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static int[]
Copies the content of the collection to an array.static int[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static long[]
Copies the content of the collection to an array.static long[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static short[]
Copies the content of the collection to an array.static short[]
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.static Object
wrappedArray
(CollectionNumber coll) If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static byte[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static double[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static float[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static int[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static long[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.static short[]
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION.
-
Method Details
-
wrappedArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedFloatArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedDoubleArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedByteArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedShortArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedIntArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
wrappedLongArray
If available, return the array wrapped by the collection - USE WITH CAUTION AS IT EXPOSES THE INTERNAL STATE OF THE COLLECTION. This is provided in case an external routine for computation requires you to use array, and you want to avoid the copy for performance reason.- Parameters:
coll
- the collection- Returns:
- the array or null
-
floatArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
doubleArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
byteArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
shortArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
intArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
longArrayCopyOf
Copies the content of the collection to an array.- Parameters:
coll
- the collection- Returns:
- the array
-
floatArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-
doubleArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-
byteArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-
shortArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-
intArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-
longArrayWrappedOrCopy
Returns either the wrapped array (if exists and matches the type) or a copy - USE WITH CAUTION AS IT MAY EXPOSE THE INTERNAL STATE OF THE COLLECTION.- Parameters:
coll
- the collection- Returns:
- the array
-