Array Getter and Setter Methods : Array Reflection Utilities « Collections « Java Tutorial






GETTER METHODSSETTER METHODS
get(Object array, int index)set(Object array, int index, Object value)
getBoolean(Object array, int index)setBoolean(Object array, int index, boolean value)
getByte(Object array, int index)setByte(Object array, int index, byte value)
getChar(Object array, int index)setChar(Object array, int index, char value)
getDouble(Object array, int index)setDouble(Object array, int index, double value)
getFloat(Object array, int index)setFloat(Object array, int index, float value)
getInt(Object array, int index)setInt(Object array, int index, int value)
getLong(Object array, int index)setLong(Object array, int index, long value)
getShort(Object array, int index)setShort(Object array, int index, short value)










9.7.Array Reflection Utilities
9.7.1.Array Getter and Setter Methods
9.7.2.Filling Arrays method signature
9.7.3.Filling byte array
9.7.4.Using a Utility Method in java.util.Arrays class to Initialize an Array
9.7.5.Using reflection method to create new instance for an Array
9.7.6.Using reflection method to create new instance for a two dimensional Array
9.7.7.Checking Equality
9.7.8.Using reflection to check array type and length
9.7.9.Using reflection to create, fill, and display an array
9.7.10.Get array length using reflection method
9.7.11.Doubling the size of an array: double the size of any type of array
9.7.12.To fill part of array with object value, starting at array[fromIndex] up to and including array[toIndex-1]
9.7.13.Use Arrays.asList to convert array to list
9.7.14.Use Arrays.asList to convert array to generic list
9.7.15.Use Arrays.sort to sort an array
9.7.16.Use Arrays.equals to compare arrays
9.7.17.Use Arrays.fill to set values of array