/** * Gets the value at index from the array as a String. Calls value(). * * @param index the index of the value to get. * @return the value at index in the array as a String. * @throws Exception if index is out of bounds. */ public String valueString(int index) throws Exception { return value(index); }
/** * Gets the value at index from the array as a String. Calls value(). * * @param index the index of the value to get. * @return the value at index in the array as a String. * @throws Exception if index is out of bounds. */ public String valueString(int index) throws Exception { return value(index); }
/** * Gets the value at index from the array as a double. * * @param index the index of the value to get. * @return the value at index in the array as a double. * @throws Exception if index is out of bounds. */ public double valueDouble(int index) throws Exception { if (m_type == ArrayType.STRING) { throw new Exception("[Array] Array does not contain numbers!"); } return Double.parseDouble(value(index)); }
/** * Gets the value at index from the array as a double. * * @param index the index of the value to get. * @return the value at index in the array as a double. * @throws Exception if index is out of bounds. */ public double valueDouble(int index) throws Exception { if (m_type == ArrayType.STRING) { throw new Exception("[Array] Array does not contain numbers!"); } return Double.parseDouble(value(index)); }
/** * Gets the value at index from the array as a float. * * @param index the index of the value to get. * @return the value at index in the array as a float. * @throws Exception if index is out of bounds. */ public float valueFloat(int index) throws Exception { if (m_type == ArrayType.STRING) { throw new Exception("[Array] Array does not contain numbers!"); } return Float.parseFloat(value(index)); }
/** * Gets the value at index from the array as an int. * * @param index the index of the value to get. * @return the value at index in the array as an int. * @throws Exception if index is out of bounds. */ public int valueInt(int index) throws Exception { if (m_type != ArrayType.INT && m_type != ArrayType.INT_SPARSE) { throw new Exception("[Array] Array does not contain integers!"); } return Integer.parseInt(value(index)); }
/** * Gets the value at index from the array as an int. * * @param index the index of the value to get. * @return the value at index in the array as an int. * @throws Exception if index is out of bounds. */ public int valueInt(int index) throws Exception { if (m_type != ArrayType.INT && m_type != ArrayType.INT_SPARSE) { throw new Exception("[Array] Array does not contain integers!"); } return Integer.parseInt(value(index)); }
/** * Gets the value at index from the array as a float. * * @param index the index of the value to get. * @return the value at index in the array as a float. * @throws Exception if index is out of bounds. */ public float valueFloat(int index) throws Exception { if (m_type == ArrayType.STRING) { throw new Exception("[Array] Array does not contain numbers!"); } return Float.parseFloat(value(index)); }