Package oracle.nosql.driver.values
Class ArrayValue
java.lang.Object
oracle.nosql.driver.values.FieldValue
oracle.nosql.driver.values.ArrayValue
- All Implemented Interfaces:
- Comparable<FieldValue>,- Iterable<FieldValue>
ArrayValue represents an array of 
FieldValue instances. It behaves
 in a similar manner to ArrayList with operations to set and add
 entries. ArrayValue indexes are zero-based.- 
Nested Class SummaryNested classes/interfaces inherited from class oracle.nosql.driver.values.FieldValueFieldValue.Type
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty ArrayValueArrayValue(int size) Creates an empty ArrayValue with the specified size
- 
Method SummaryModifier and TypeMethodDescriptionadd(boolean value) Adds a new value at the end of the arrayadd(byte[] value) Adds a new value at the end of the arrayadd(double value) Adds a new value at the end of the arrayadd(int value) Adds a new value at the end of the arrayadd(int index, boolean value) Inserts a new value at the specified index.add(int index, byte[] value) Inserts a new value at the specified index.add(int index, double value) Inserts a new value at the specified index.add(int index, int value) Inserts a new value at the specified index.add(int index, long value) Inserts a new value at the specified index.Inserts a new value at the specified index.add(int index, BigDecimal value) Inserts a new value at the specified index.add(int index, FieldValue value) Inserts the field at the specified index.add(long value) Adds a new value at the end of the arrayAdds a new value at the end of the arrayadd(BigDecimal value) Adds a new value at the end of the arrayadd(FieldValue value) Adds the field to the end of the arrayaddAll(int index, Iterator<? extends FieldValue> iter) Inserts all of the elements in the specified Iterator into the array, starting at the specified position.addAll(int index, Stream<? extends FieldValue> stream) Inserts all of the elements in the specified Stream into the array, starting at the specified position.addAll(Iterator<? extends FieldValue> iter) Adds all of the values in the Iterator to the end of the array in the order they are returned by the iterator.addAll(Stream<? extends FieldValue> stream) Adds all of the values in the Stream to the end of the array in the order they are returned by the stream.intcompareTo(FieldValue other) booleanget(int index) Returns the field at the specified index.getType()Returns the type of the objectgetType(int index) Returns the type of the field at the specified index.inthashCode()iterator()remove(int index) Removes the element at the specified position, shifting any subsequent elements to the left.set(int index, boolean value) Replaces the element at the specified position with the new value.set(int index, byte[] value) Replaces the element at the specified position with the new value.set(int index, double value) Replaces the element at the specified position with the new value.set(int index, int value) Replaces the element at the specified position with the new value.set(int index, long value) Replaces the element at the specified position with the new value.Replaces the element at the specified position with the new value.set(int index, BigDecimal value) Replaces the element at the specified position with the new value.set(int index, FieldValue value) Replaces the element at the specified position with the new value.intsize()Returns the size of the arrayMethods inherited from class oracle.nosql.driver.values.FieldValueasArray, asBinary, asBoolean, asDouble, asInteger, asJsonNull, asLong, asMap, asNull, asNumber, asString, asTimestamp, castAsDouble, createFromJson, createFromJson, createFromJson, getBinary, getBoolean, getDouble, getInt, getLong, getNumber, getSerializedSize, getString, getTimestamp, isAnyNull, isArray, isAtomic, isBinary, isBoolean, isDouble, isInteger, isJsonNull, isLong, isMap, isNull, isNumber, isNumeric, isString, isTimestamp, toJson, toJson, toStringMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
ArrayValuepublic ArrayValue()Creates an empty ArrayValue
- 
ArrayValuepublic ArrayValue(int size) Creates an empty ArrayValue with the specified size- Parameters:
- size- the starting size for the array
 
 
- 
- 
Method Details- 
getTypeDescription copied from class:FieldValueReturns the type of the object- Specified by:
- getTypein class- FieldValue
- Returns:
- the type
 
- 
sizepublic int size()Returns the size of the array- Returns:
- the size
 
- 
getTypeReturns the type of the field at the specified index.- Parameters:
- index- the index of the value to return, zero-based
- Returns:
- the type of the field at the specified index
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
getReturns the field at the specified index.- Parameters:
- index- the index of the value to return, zero-based
- Returns:
- the field at the specified index
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds the field to the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts the field at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
removeRemoves the element at the specified position, shifting any subsequent elements to the left.- Parameters:
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAllAdds all of the values in the Stream to the end of the array in the order they are returned by the stream.- Parameters:
- stream- the Stream
- Returns:
- this
 
- 
addAllInserts all of the elements in the specified Stream into the array, starting at the specified position. Shifts the element currently at that position and any subsequent elements to the right (increases their indices). New elements are added in the order that they are returned by the stream.- Parameters:
- index- the index to use
- stream- the Stream
- Returns:
- this
 
- 
addAllAdds all of the values in the Iterator to the end of the array in the order they are returned by the iterator.- Parameters:
- iter- the iterator
- Returns:
- this
 
- 
addAllInserts all of the elements in the specified Iterator into the array, starting at the specified position. Shifts the element currently at that position and any subsequent elements to the right (increases their indices). New elements are added in the order that they are returned by the iterator.- Parameters:
- index- the index to use
- iter- the iterator
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
addAdds a new value at the end of the array- Parameters:
- value- the value to add
- Returns:
- this
 
- 
addInserts a new value at the specified index. Shifts the element at that position and any subsequent elements to the right.- Parameters:
- index- the index to use
- value- the value to add
- Returns:
- this
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
setReplaces the element at the specified position with the new value.- Parameters:
- value- the value to set
- index- the index to use
- Returns:
- the element previously at the specified position
- Throws:
- IndexOutOfBoundsException- if the index is out of the range of the array.
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<FieldValue>
 
- 
iterator- Specified by:
- iteratorin interface- Iterable<FieldValue>
 
- 
equals
- 
hashCodepublic int hashCode()
 
-