Class ListDataModel

java.lang.Object
swim.store.mem.ListDataModel
All Implemented Interfaces:
Iterable<swim.structure.Value>, Collection<swim.structure.Value>, List<swim.structure.Value>, swim.api.data.ListData<swim.structure.Value>, swim.store.DataBinding, swim.store.ListDataBinding, swim.util.KeyedList<swim.structure.Value>

public class ListDataModel extends Object implements swim.store.ListDataBinding
  • Field Details

    • name

      protected final swim.structure.Value name
    • tree

      protected final swim.collections.STreeList<swim.structure.Value> tree
    • dataContext

      protected swim.store.ListDataContext dataContext
    • storeBinding

      protected swim.store.StoreBinding storeBinding
  • Constructor Details

    • ListDataModel

      public ListDataModel(swim.structure.Value name, swim.collections.STreeList<swim.structure.Value> tree)
  • Method Details

    • dataContext

      public swim.store.ListDataContext dataContext()
      Specified by:
      dataContext in interface swim.store.DataBinding
      Specified by:
      dataContext in interface swim.store.ListDataBinding
    • setDataContext

      public void setDataContext(swim.store.ListDataContext dataContext)
      Specified by:
      setDataContext in interface swim.store.ListDataBinding
    • storeBinding

      public swim.store.StoreBinding storeBinding()
      Specified by:
      storeBinding in interface swim.store.DataBinding
    • setStoreBinding

      public void setStoreBinding(swim.store.StoreBinding storeBinding)
      Specified by:
      setStoreBinding in interface swim.store.DataBinding
    • unwrapData

      public <T> T unwrapData(Class<T> dataClass)
      Specified by:
      unwrapData in interface swim.store.DataBinding
    • tree

      public final swim.collections.STreeList<swim.structure.Value> tree()
    • name

      public final swim.structure.Value name()
      Specified by:
      name in interface swim.store.DataBinding
      Specified by:
      name in interface swim.api.data.ListData<swim.structure.Value>
    • valueForm

      public swim.structure.Form<swim.structure.Value> valueForm()
      Specified by:
      valueForm in interface swim.api.data.ListData<swim.structure.Value>
    • valueForm

      public <V2> swim.api.data.ListData<V2> valueForm(swim.structure.Form<V2> valueForm)
      Specified by:
      valueForm in interface swim.api.data.ListData<swim.structure.Value>
    • valueClass

      public <V2> swim.api.data.ListData<V2> valueClass(Class<V2> valueClass)
      Specified by:
      valueClass in interface swim.api.data.ListData<swim.structure.Value>
    • dataSize

      public long dataSize()
      Specified by:
      dataSize in interface swim.store.DataBinding
    • isResident

      public boolean isResident()
      Specified by:
      isResident in interface swim.store.DataBinding
      Specified by:
      isResident in interface swim.api.data.ListData<swim.structure.Value>
    • isResident

      public ListDataModel isResident(boolean isResident)
      Specified by:
      isResident in interface swim.store.DataBinding
      Specified by:
      isResident in interface swim.api.data.ListData<swim.structure.Value>
      Specified by:
      isResident in interface swim.store.ListDataBinding
    • isTransient

      public boolean isTransient()
      Specified by:
      isTransient in interface swim.store.DataBinding
      Specified by:
      isTransient in interface swim.api.data.ListData<swim.structure.Value>
    • isTransient

      public ListDataModel isTransient(boolean isTransient)
      Specified by:
      isTransient in interface swim.store.DataBinding
      Specified by:
      isTransient in interface swim.api.data.ListData<swim.structure.Value>
      Specified by:
      isTransient in interface swim.store.ListDataBinding
    • size

      public int size()
      Specified by:
      size in interface Collection<swim.structure.Value>
      Specified by:
      size in interface List<swim.structure.Value>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<swim.structure.Value>
      Specified by:
      isEmpty in interface List<swim.structure.Value>
    • contains

      public boolean contains(Object value)
      Specified by:
      contains in interface Collection<swim.structure.Value>
      Specified by:
      contains in interface List<swim.structure.Value>
    • containsAll

      public boolean containsAll(Collection<?> values)
      Specified by:
      containsAll in interface Collection<swim.structure.Value>
      Specified by:
      containsAll in interface List<swim.structure.Value>
    • indexOf

      public int indexOf(Object value)
      Specified by:
      indexOf in interface List<swim.structure.Value>
    • lastIndexOf

      public int lastIndexOf(Object value)
      Specified by:
      lastIndexOf in interface List<swim.structure.Value>
    • get

      public swim.structure.Value get(int index)
      Specified by:
      get in interface List<swim.structure.Value>
    • set

      public swim.structure.Value set(int index, swim.structure.Value value)
      Specified by:
      set in interface List<swim.structure.Value>
    • add

      public boolean add(swim.structure.Value value)
      Specified by:
      add in interface Collection<swim.structure.Value>
      Specified by:
      add in interface List<swim.structure.Value>
    • addAll

      public boolean addAll(Collection<? extends swim.structure.Value> values)
      Specified by:
      addAll in interface Collection<swim.structure.Value>
      Specified by:
      addAll in interface List<swim.structure.Value>
    • add

      public void add(int index, swim.structure.Value value)
      Specified by:
      add in interface List<swim.structure.Value>
    • addAll

      public boolean addAll(int index, Collection<? extends swim.structure.Value> values)
      Specified by:
      addAll in interface List<swim.structure.Value>
    • remove

      public swim.structure.Value remove(int index)
      Specified by:
      remove in interface List<swim.structure.Value>
    • remove

      public boolean remove(Object value)
      Specified by:
      remove in interface Collection<swim.structure.Value>
      Specified by:
      remove in interface List<swim.structure.Value>
    • removeAll

      public boolean removeAll(Collection<?> values)
      Specified by:
      removeAll in interface Collection<swim.structure.Value>
      Specified by:
      removeAll in interface List<swim.structure.Value>
    • retainAll

      public boolean retainAll(Collection<?> values)
      Specified by:
      retainAll in interface Collection<swim.structure.Value>
      Specified by:
      retainAll in interface List<swim.structure.Value>
    • drop

      public void drop(int lower)
      Specified by:
      drop in interface swim.api.data.ListData<swim.structure.Value>
    • take

      public void take(int upper)
      Specified by:
      take in interface swim.api.data.ListData<swim.structure.Value>
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<swim.structure.Value>
      Specified by:
      clear in interface List<swim.structure.Value>
    • iterator

      public Iterator<swim.structure.Value> iterator()
      Specified by:
      iterator in interface Collection<swim.structure.Value>
      Specified by:
      iterator in interface Iterable<swim.structure.Value>
      Specified by:
      iterator in interface List<swim.structure.Value>
    • listIterator

      public ListIterator<swim.structure.Value> listIterator()
      Specified by:
      listIterator in interface List<swim.structure.Value>
    • listIterator

      public ListIterator<swim.structure.Value> listIterator(int index)
      Specified by:
      listIterator in interface List<swim.structure.Value>
    • subList

      public List<swim.structure.Value> subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<swim.structure.Value>
    • snapshot

      public swim.util.KeyedList<swim.structure.Value> snapshot()
      An immutable copy of this STreeList's data.
      Specified by:
      snapshot in interface swim.api.data.ListData<swim.structure.Value>
    • toArray

      public Object[] toArray()
      Specified by:
      toArray in interface Collection<swim.structure.Value>
      Specified by:
      toArray in interface List<swim.structure.Value>
    • toArray

      public <T> T[] toArray(T[] array)
      Specified by:
      toArray in interface Collection<swim.structure.Value>
      Specified by:
      toArray in interface List<swim.structure.Value>
    • close

      public void close()
      Specified by:
      close in interface swim.store.DataBinding
      Specified by:
      close in interface swim.api.data.ListData<swim.structure.Value>
    • get

      public swim.structure.Value get(int index, Object key)
      Specified by:
      get in interface swim.util.KeyedList<swim.structure.Value>
    • getEntry

      public Map.Entry<Object,swim.structure.Value> getEntry(int index)
      Specified by:
      getEntry in interface swim.util.KeyedList<swim.structure.Value>
    • getEntry

      public Map.Entry<Object,swim.structure.Value> getEntry(int index, Object key)
      Specified by:
      getEntry in interface swim.util.KeyedList<swim.structure.Value>
    • set

      public swim.structure.Value set(int index, swim.structure.Value element, Object key)
      Specified by:
      set in interface swim.util.KeyedList<swim.structure.Value>
    • add

      public boolean add(swim.structure.Value element, Object key)
      Specified by:
      add in interface swim.util.KeyedList<swim.structure.Value>
    • add

      public void add(int index, swim.structure.Value element, Object key)
      Specified by:
      add in interface swim.util.KeyedList<swim.structure.Value>
    • remove

      public swim.structure.Value remove(int index, Object key)
      Specified by:
      remove in interface swim.util.KeyedList<swim.structure.Value>
    • move

      public void move(int fromIndex, int toIndex)
      Specified by:
      move in interface swim.util.KeyedList<swim.structure.Value>
    • move

      public void move(int fromIndex, int toIndex, Object key)
      Specified by:
      move in interface swim.util.KeyedList<swim.structure.Value>
    • keyIterator

      public ListIterator<Object> keyIterator()
      Specified by:
      keyIterator in interface swim.util.KeyedList<swim.structure.Value>
    • entryIterator

      public ListIterator<Map.Entry<Object,swim.structure.Value>> entryIterator()
      Specified by:
      entryIterator in interface swim.util.KeyedList<swim.structure.Value>