- java.lang.Object
-
- swim.db.STreeList
-
- All Implemented Interfaces:
Iterable<swim.structure.Value>,Collection<swim.structure.Value>,List<swim.structure.Value>,swim.util.KeyedList<swim.structure.Value>
public class STreeList extends Object implements swim.util.KeyedList<swim.structure.Value>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, swim.structure.Value newValue)voidadd(int index, swim.structure.Value newValue, Object key)booleanadd(swim.structure.Value newValue)booleanadd(swim.structure.Value newValue, Object key)booleanaddAll(int index, Collection<? extends swim.structure.Value> newValues)booleanaddAll(Collection<? extends swim.structure.Value> newValues)voidclear()Chunkcommit(Commit commit)voidcommitAsync(Commit commit)booleancontains(Object value)booleancontainsAll(Collection<?> values)Databasedatabase()swim.util.Cursor<swim.structure.Value>depthIterator(int maxDepth)protected voiddidFail(StoreException error)voiddrop(int lower)swim.util.Cursor<Map.Entry<Object,swim.structure.Value>>entryIterator()swim.structure.Valueget(int index)swim.structure.Valueget(int index, Object key)Map.Entry<Object,swim.structure.Value>getEntry(int index)Map.Entry<Object,swim.structure.Value>getEntry(int index, Object key)protected swim.structure.Valueidentify(swim.structure.Value value)intindexOf(Object object)booleanisEmpty()booleanisResident()STreeListisResident(boolean isResident)booleanisTransient()STreeListisTransient(boolean isTransient)swim.util.Cursor<swim.structure.Value>iterator()swim.util.Cursor<Object>keyIterator()intlastIndexOf(Object object)swim.util.Cursor<swim.structure.Value>listIterator()swim.util.Cursor<swim.structure.Value>listIterator(int index)STreeListload()voidmove(int fromIndex, int toIndex)voidmove(int fromIndex, int toIndex, Object key)swim.structure.Valuename()swim.structure.Valueremove(int index)swim.structure.Valueremove(int index, Object key)booleanremove(Object value)booleanremoveAll(Collection<?> values)booleanretainAll(Collection<?> values)swim.structure.Valueset(int index, swim.structure.Value newValue)swim.structure.Valueset(int index, swim.structure.Value newValue, Object key)StoreSettingssettings()voidsetTreeDelegate(TreeDelegate treeDelegate)intsize()STreeListViewsnapshot()longspan()List<swim.structure.Value>subList(int fromIndex, int toIndex)voidtake(int upper)Object[]toArray()<T> T[]toArray(T[] array)STreetree()TreeDelegatetreeDelegate()longtreeSize()Trunk<STree>trunk()<V> swim.structure.collections.ValueList<V>valueClass(Class<V> valueClass)<V> swim.structure.collections.ValueList<V>valueForm(swim.structure.Form<V> 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
-
-
-
-
Method Detail
-
settings
public final StoreSettings settings()
-
database
public final Database database()
-
name
public final swim.structure.Value name()
-
tree
public final STree tree()
-
treeDelegate
public final TreeDelegate treeDelegate()
-
setTreeDelegate
public void setTreeDelegate(TreeDelegate treeDelegate)
-
isResident
public boolean isResident()
-
isResident
public STreeList isResident(boolean isResident)
-
isTransient
public boolean isTransient()
-
isTransient
public STreeList isTransient(boolean isTransient)
-
valueForm
public <V> swim.structure.collections.ValueList<V> valueForm(swim.structure.Form<V> valueForm)
-
valueClass
public <V> swim.structure.collections.ValueList<V> valueClass(Class<V> valueClass)
-
snapshot
public STreeListView snapshot()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<swim.structure.Value>- Specified by:
isEmptyin interfaceList<swim.structure.Value>
-
size
public int size()
- Specified by:
sizein interfaceCollection<swim.structure.Value>- Specified by:
sizein interfaceList<swim.structure.Value>
-
span
public long span()
-
treeSize
public long treeSize()
-
contains
public boolean contains(Object value)
- Specified by:
containsin interfaceCollection<swim.structure.Value>- Specified by:
containsin interfaceList<swim.structure.Value>
-
containsAll
public boolean containsAll(Collection<?> values)
- Specified by:
containsAllin interfaceCollection<swim.structure.Value>- Specified by:
containsAllin interfaceList<swim.structure.Value>
-
indexOf
public int indexOf(Object object)
-
lastIndexOf
public int lastIndexOf(Object object)
- Specified by:
lastIndexOfin interfaceList<swim.structure.Value>
-
get
public swim.structure.Value get(int index)
-
get
public swim.structure.Value get(int index, Object key)- Specified by:
getin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
public Map.Entry<Object,swim.structure.Value> getEntry(int index)
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
getEntry
public Map.Entry<Object,swim.structure.Value> getEntry(int index, Object key)
- Specified by:
getEntryin interfaceswim.util.KeyedList<swim.structure.Value>
-
set
public swim.structure.Value set(int index, swim.structure.Value newValue)
-
set
public swim.structure.Value set(int index, swim.structure.Value newValue, Object key)- Specified by:
setin interfaceswim.util.KeyedList<swim.structure.Value>
-
add
public boolean add(swim.structure.Value newValue)
- Specified by:
addin interfaceCollection<swim.structure.Value>- Specified by:
addin interfaceList<swim.structure.Value>
-
add
public boolean add(swim.structure.Value newValue, Object key)- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
addAll
public boolean addAll(Collection<? extends swim.structure.Value> newValues)
- Specified by:
addAllin interfaceCollection<swim.structure.Value>- Specified by:
addAllin interfaceList<swim.structure.Value>
-
add
public void add(int index, swim.structure.Value newValue)
-
add
public void add(int index, swim.structure.Value newValue, Object key)- Specified by:
addin interfaceswim.util.KeyedList<swim.structure.Value>
-
addAll
public boolean addAll(int index, Collection<? extends swim.structure.Value> newValues)
-
remove
public swim.structure.Value remove(int index)
-
remove
public swim.structure.Value remove(int index, Object key)- Specified by:
removein interfaceswim.util.KeyedList<swim.structure.Value>
-
remove
public boolean remove(Object value)
- Specified by:
removein interfaceCollection<swim.structure.Value>- Specified by:
removein interfaceList<swim.structure.Value>
-
removeAll
public boolean removeAll(Collection<?> values)
- Specified by:
removeAllin interfaceCollection<swim.structure.Value>- Specified by:
removeAllin interfaceList<swim.structure.Value>
-
retainAll
public boolean retainAll(Collection<?> values)
- Specified by:
retainAllin interfaceCollection<swim.structure.Value>- Specified by:
retainAllin interfaceList<swim.structure.Value>
-
move
public void move(int fromIndex, int toIndex)- Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
move
public void move(int fromIndex, int toIndex, Object key)- Specified by:
movein interfaceswim.util.KeyedList<swim.structure.Value>
-
drop
public void drop(int lower)
-
take
public void take(int upper)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<swim.structure.Value>- Specified by:
clearin interfaceList<swim.structure.Value>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<swim.structure.Value>- Specified by:
toArrayin interfaceList<swim.structure.Value>
-
iterator
public swim.util.Cursor<swim.structure.Value> iterator()
-
listIterator
public swim.util.Cursor<swim.structure.Value> listIterator()
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
listIterator
public swim.util.Cursor<swim.structure.Value> listIterator(int index)
- Specified by:
listIteratorin interfaceList<swim.structure.Value>
-
keyIterator
public swim.util.Cursor<Object> keyIterator()
- Specified by:
keyIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
entryIterator
public swim.util.Cursor<Map.Entry<Object,swim.structure.Value>> entryIterator()
- Specified by:
entryIteratorin interfaceswim.util.KeyedList<swim.structure.Value>
-
depthIterator
public swim.util.Cursor<swim.structure.Value> depthIterator(int maxDepth)
-
subList
public List<swim.structure.Value> subList(int fromIndex, int toIndex)
-
identify
protected swim.structure.Value identify(swim.structure.Value value)
-
didFail
protected void didFail(StoreException error)
-
load
public STreeList load()
-
commitAsync
public void commitAsync(Commit commit)
-
commit
public Chunk commit(Commit commit) throws InterruptedException
- Throws:
InterruptedException
-
-