- java.lang.Object
-
- swim.store.mem.ListDataModel
-
- All Implemented Interfaces:
Iterable<Value>
,Collection<Value>
,List<Value>
,ListData<Value>
,DataBinding
,ListDataBinding
,KeyedList<Value>
public class ListDataModel extends Object implements ListDataBinding
-
-
Field Summary
Fields Modifier and Type Field Description protected ListDataContext
dataContext
protected Value
name
protected StoreBinding
storeBinding
protected STreeList<Value>
tree
-
Constructor Summary
Constructors Constructor Description ListDataModel(Value name, STreeList<Value> tree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, Value value)
void
add(int index, Value element, Object key)
boolean
add(Value value)
boolean
add(Value element, Object key)
boolean
addAll(int index, Collection<? extends Value> values)
boolean
addAll(Collection<? extends Value> values)
void
clear()
void
close()
boolean
contains(Object value)
boolean
containsAll(Collection<?> values)
ListDataContext
dataContext()
long
dataSize()
void
drop(int lower)
ListIterator<Map.Entry<Object,Value>>
entryIterator()
Value
get(int index)
Value
get(int index, Object key)
Map.Entry<Object,Value>
getEntry(int index)
Map.Entry<Object,Value>
getEntry(int index, Object key)
int
indexOf(Object value)
boolean
isEmpty()
boolean
isResident()
ListDataModel
isResident(boolean isResident)
boolean
isTransient()
ListDataModel
isTransient(boolean isTransient)
Iterator<Value>
iterator()
ListIterator<Object>
keyIterator()
int
lastIndexOf(Object value)
ListIterator<Value>
listIterator()
ListIterator<Value>
listIterator(int index)
void
move(int fromIndex, int toIndex)
void
move(int fromIndex, int toIndex, Object key)
Value
name()
Value
remove(int index)
Value
remove(int index, Object key)
boolean
remove(Object value)
boolean
removeAll(Collection<?> values)
boolean
retainAll(Collection<?> values)
Value
set(int index, Value value)
Value
set(int index, Value element, Object key)
void
setDataContext(ListDataContext dataContext)
void
setStoreBinding(StoreBinding storeBinding)
int
size()
KeyedList<Value>
snapshot()
An immutable copy of thisSTreeList
's data.StoreBinding
storeBinding()
List<Value>
subList(int fromIndex, int toIndex)
void
take(int upper)
Object[]
toArray()
<T> T[]
toArray(T[] array)
STreeList<Value>
tree()
<T> T
unwrapData(Class<T> dataClass)
<V2> ListData<V2>
valueClass(Class<V2> valueClass)
Form<Value>
valueForm()
<V2> ListData<V2>
valueForm(Form<V2> valueForm)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Field Detail
-
name
protected final Value name
-
dataContext
protected ListDataContext dataContext
-
storeBinding
protected StoreBinding storeBinding
-
-
Method Detail
-
dataContext
public ListDataContext dataContext()
- Specified by:
dataContext
in interfaceDataBinding
- Specified by:
dataContext
in interfaceListDataBinding
-
setDataContext
public void setDataContext(ListDataContext dataContext)
- Specified by:
setDataContext
in interfaceListDataBinding
-
storeBinding
public StoreBinding storeBinding()
- Specified by:
storeBinding
in interfaceDataBinding
-
setStoreBinding
public void setStoreBinding(StoreBinding storeBinding)
- Specified by:
setStoreBinding
in interfaceDataBinding
-
unwrapData
public <T> T unwrapData(Class<T> dataClass)
- Specified by:
unwrapData
in interfaceDataBinding
-
name
public final Value name()
- Specified by:
name
in interfaceDataBinding
- Specified by:
name
in interfaceListData<Value>
-
valueClass
public <V2> ListData<V2> valueClass(Class<V2> valueClass)
- Specified by:
valueClass
in interfaceListData<Value>
-
dataSize
public long dataSize()
- Specified by:
dataSize
in interfaceDataBinding
-
isResident
public boolean isResident()
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceListData<Value>
-
isResident
public ListDataModel isResident(boolean isResident)
- Specified by:
isResident
in interfaceDataBinding
- Specified by:
isResident
in interfaceListData<Value>
- Specified by:
isResident
in interfaceListDataBinding
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceListData<Value>
-
isTransient
public ListDataModel isTransient(boolean isTransient)
- Specified by:
isTransient
in interfaceDataBinding
- Specified by:
isTransient
in interfaceListData<Value>
- Specified by:
isTransient
in interfaceListDataBinding
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object value)
-
containsAll
public boolean containsAll(Collection<?> values)
- Specified by:
containsAll
in interfaceCollection<Value>
- Specified by:
containsAll
in interfaceList<Value>
-
lastIndexOf
public int lastIndexOf(Object value)
- Specified by:
lastIndexOf
in interfaceList<Value>
-
add
public boolean add(Value value)
-
addAll
public boolean addAll(Collection<? extends Value> values)
-
addAll
public boolean addAll(int index, Collection<? extends Value> values)
-
remove
public boolean remove(Object value)
-
removeAll
public boolean removeAll(Collection<?> values)
-
retainAll
public boolean retainAll(Collection<?> values)
-
clear
public void clear()
-
listIterator
public ListIterator<Value> listIterator()
- Specified by:
listIterator
in interfaceList<Value>
-
listIterator
public ListIterator<Value> listIterator(int index)
- Specified by:
listIterator
in interfaceList<Value>
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] array)
-
close
public void close()
- Specified by:
close
in interfaceDataBinding
- Specified by:
close
in interfaceListData<Value>
-
move
public void move(int fromIndex, int toIndex, Object key)
-
keyIterator
public ListIterator<Object> keyIterator()
- Specified by:
keyIterator
in interfaceKeyedList<Value>
-
entryIterator
public ListIterator<Map.Entry<Object,Value>> entryIterator()
- Specified by:
entryIterator
in interfaceKeyedList<Value>
-
-