|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Cast
public final class Cast
Static Class for casting Object arrays to their corresponding primitive type.
Similar to the toArray(T[] a)
method specified in the java Collections
interface, but for float[] and int[] arrays (as opposed to Float[] and Integer[]).
Method Summary | |
---|---|
static float[] |
arrayListToFloat(ArrayList<Float> _inputDat)
function for casting ArrayList to float[] |
static int[] |
arrayListToInt(ArrayList<Integer> _inputDat)
function for casting ArrayList to int[] |
static float[] |
doubleToFloat(double[] _inputDat)
function for casting double[] to float[] |
static float[][] |
doubleToFloat(double[][] _inputDat)
function for casting double[][] to float[][] |
static double[] |
floatToDouble(float[] _inputDat)
function for casting float[] to double[] |
static double[][] |
floatToDouble(float[][] _inputDat)
function for casting float[][] to double[][] |
static PVector[] |
floatToPVector(float[] x,
float[] y)
Returns a PVector array with the x, and coordinates set to the input values, and the z coordinates set to zero. |
static PVector[] |
floatToPVector(float[] x,
float[] y,
float[] z)
Returns a PVector array with the x, y, and z coordinates set to the input values (technically not a cast, but a reorganization). |
static float[] |
keySetToFloat(HashMap _hMap)
Function for casting hashMap keySet to float[] |
static int[] |
keySetToInt(HashMap _hMap)
Function for casting hashMap keySet to float[] |
static String[] |
keySetToString(HashMap _hMap)
Function for casting hashMap keySet to String[] |
static float[] |
setToFloat(Set<Float> theSet)
Function for casting a Set to float[] |
static int[] |
setToInt(Set<Integer> theSet)
Function for casting a Set to float[] |
static String[] |
setToString(Set<String> theSet)
Function for casting a Set to String array. |
static float[] |
vectorToFloat(Vector<Float> _inputDat)
function for casting Vector to float[] |
static int[] |
vectorToInt(Vector<Integer> _inputDat)
function for casting Vector to int[] |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int[] arrayListToInt(ArrayList<Integer> _inputDat)
_inputDat
- ArrayList array that needs to be cast to int[]
public static float[] arrayListToFloat(ArrayList<Float> _inputDat)
_inputDat
- ArrayList array that needs to be cast to float[]
public static double[][] floatToDouble(float[][] _inputDat)
_inputDat
- float[][] 2d array
public static double[] floatToDouble(float[] _inputDat)
_inputDat
- float[] array
public static float[][] doubleToFloat(double[][] _inputDat)
_inputDat
- double[][] 2d array
public static float[] doubleToFloat(double[] _inputDat)
_inputDat
- double[] array
public static String[] keySetToString(HashMap _hMap)
_hMap
- input HashMap
public static int[] keySetToInt(HashMap _hMap)
_hMap
- input HashMap
public static float[] keySetToFloat(HashMap _hMap)
_hMap
- input HashMap
public static int[] setToInt(Set<Integer> theSet)
public static float[] setToFloat(Set<Float> theSet)
public static String[] setToString(Set<String> theSet)
public static int[] vectorToInt(Vector<Integer> _inputDat)
_inputDat
- Vector array that needs to be cast to int[]
public static float[] vectorToFloat(Vector<Float> _inputDat)
_inputDat
- Vector array that needs to be cast to float[]
public static PVector[] floatToPVector(float[] x, float[] y, float[] z)
public static PVector[] floatToPVector(float[] x, float[] y)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |