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 TypeMethodDescriptioninthashCode()hashcode() implementations of Complex list objects do not necessarily adhere to the default Java List contract for hashcode.static StoreListConstruct a single StoreList by parser from the provided Reader.static StoreListConstruct a single StoreList by parser the provided StringMake a copy of this instance that is assured to be mutable.static StoreListnewList()Canonical away to create a new StoreList instance.default StoreListwith(boolean... bools) Fluently add boolean values to the list.default StoreListwith(byte[]... bytes) Fluently add byte[] values to the list.default StoreListwith(char... chars) Fluently add char values to the list.default StoreListwith(double... doubles) Fluently add a list of double values to the list.default StoreListwith(int... ints) Fluently add a list of integer values to the list.default StoreListwith(long... longs) Fluently add a list of long values to the list.default StoreListFluently add calls (just type and value) to the list.default StoreListFluently add a list values to the list.default StoreListFluently add maps values to the list.default StoreListFluently add a list of strings to the list.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com.terracottatech.store.ComplexData
find, isEmpty, isMutable, notEmpty, size, toStringMethods 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:
hashCodein interfaceCollection<TypedValue<?>>- Specified by:
hashCodein interfaceList<TypedValue<?>>- Overrides:
hashCodein 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:
mutableCopyin 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. SeeStoreMapfor 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
-