Package com.terracottatech.store
Interface StoreList
- All Superinterfaces:
Collection<TypedValue<?>>
,ComplexData
,Iterable<TypedValue<?>>
,List<TypedValue<?>>
- All Known Implementing Classes:
StoreListImpl
This is the interface for a concrete value of
Type.LIST
objects. It implements a List
of TypedValue
objects.
StoreLists also have builder-esque fluent methods for specific types, the with() group of methods.
It inherits support for dot traversal find() from ComplexData
Like all ComplexData objects, StoreList's can be mutable or not; a mutable copy can be made as needed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.terracottatech.store.ComplexData
ComplexData.DotSpecParseException
-
Method Summary
Modifier and TypeMethodDescriptionint
hashCode()
hashcode() implementations of Complex list objects do not necessarily adhere to the default Java List contract for hashcode.static StoreList
Construct a single StoreList by parser from the provided Reader.static StoreList
Construct a single StoreList by parser the provided StringMake a copy of this instance that is assured to be mutable.static StoreList
newList()
Canonical away to create a new StoreList instance.default StoreList
with
(boolean... bools) Fluently add boolean values to the list.default StoreList
with
(byte[]... bytes) Fluently add byte[] values to the list.default StoreList
with
(char... chars) Fluently add char values to the list.default StoreList
with
(double... doubles) Fluently add a list of double values to the list.default StoreList
with
(int... ints) Fluently add a list of integer values to the list.default StoreList
with
(long... longs) Fluently add a list of long values to the list.default StoreList
Fluently add calls (just type and value) to the list.default StoreList
Fluently add a list values to the list.default StoreList
Fluently add maps values to the list.default StoreList
Fluently add a list of strings to the list.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface com.terracottatech.store.ComplexData
find, isEmpty, isMutable, notEmpty, size, toString
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
hashCode
int hashCode()hashcode() implementations of Complex list objects do not necessarily adhere to the default Java List contract for hashcode.- Specified by:
hashCode
in interfaceCollection<TypedValue<?>>
- Specified by:
hashCode
in interfaceList<TypedValue<?>>
- Overrides:
hashCode
in classObject
- Returns:
- hashcode.
-
newList
Canonical away to create a new StoreList instance.- Returns:
- store list
-
mutableCopy
StoreList mutableCopy()Make a copy of this instance that is assured to be mutable.- Specified by:
mutableCopy
in interfaceComplexData
- Returns:
- mutable copy.
-
with
Fluently add boolean values to the list.- Parameters:
bools
- boolean values- Returns:
- this list
-
with
Fluently add char values to the list.- Parameters:
chars
- char values- Returns:
- this list
-
with
Fluently add a list of integer values to the list.- Parameters:
ints
- int values- Returns:
- this list
-
with
Fluently add a list of long values to the list.- Parameters:
longs
- long values- Returns:
- this list
-
with
Fluently add a list of double values to the list.- Parameters:
doubles
- double values- Returns:
- this list
-
with
Fluently add a list of strings to the list.- Parameters:
strings
- string values- Returns:
- this list
-
with
Fluently add byte[] values to the list.- Parameters:
bytes
- bytes values- Returns:
- this list
-
with
Fluently add maps values to the list.- Parameters:
maps
- map values- Returns:
- this list
-
with
Fluently add a list values to the list.- Parameters:
lists
- list values- Returns:
- this list
-
with
Fluently add calls (just type and value) to the list.- Parameters:
cells
- cell values- Returns:
- this list
-
listOf
Construct a single StoreList by parser the provided String- Parameters:
in
- String representation of the StoreList- Returns:
- StoreList
- Throws:
ComplexDataParseException
- parse exception
-
listOf
Construct a single StoreList by parser from the provided Reader. SeeStoreMap
for a further explanation.- Parameters:
in
- Reader. Needs to be UTF-8 charset if you will be handling UTF characters.- Returns:
- StoreList
- Throws:
ComplexDataParseException
- parse exception
-