Module swim.runtime

Class ListLaneView<V>

  • All Implemented Interfaces:
    Iterable<V>, Collection<V>, List<V>, swim.api.http.HttpLane<Object>, swim.api.lane.Lane, swim.api.lane.ListLane<V>, swim.observable.Observable<Object>, swim.observable.ObservableList<V>, swim.util.KeyedList<V>, swim.util.Log

    public class ListLaneView<V>
    extends LaneView
    implements swim.api.lane.ListLane<V>
    • Field Detail

      • agentContext

        protected final swim.api.agent.AgentContext agentContext
      • valueForm

        protected swim.structure.Form<V> valueForm
      • flags

        protected int flags
      • dataView

        protected swim.api.data.ListData<V> dataView
    • Constructor Detail

      • ListLaneView

        public ListLaneView​(swim.api.agent.AgentContext agentContext,
                            swim.structure.Form<V> valueForm)
    • Method Detail

      • agentContext

        public swim.api.agent.AgentContext agentContext()
        Specified by:
        agentContext in class LaneView
      • valueForm

        public final swim.structure.Form<V> valueForm()
        Specified by:
        valueForm in interface swim.api.lane.ListLane<V>
      • valueForm

        public <V2> ListLaneView<V2> valueForm​(swim.structure.Form<V2> valueForm)
        Specified by:
        valueForm in interface swim.api.lane.ListLane<V>
      • valueClass

        public <V2> ListLaneView<V2> valueClass​(Class<V2> valueClass)
        Specified by:
        valueClass in interface swim.api.lane.ListLane<V>
      • setValueForm

        public void setValueForm​(swim.structure.Form<V> valueForm)
      • typesafeObservers

        protected Object typesafeObservers​(Object observers)
      • isResident

        public final boolean isResident()
        Specified by:
        isResident in interface swim.api.lane.ListLane<V>
      • isResident

        public ListLaneView<V> isResident​(boolean isResident)
        Specified by:
        isResident in interface swim.api.lane.ListLane<V>
      • isTransient

        public final boolean isTransient()
        Specified by:
        isTransient in interface swim.api.lane.ListLane<V>
      • isTransient

        public ListLaneView<V> isTransient​(boolean isTransient)
        Specified by:
        isTransient in interface swim.api.lane.ListLane<V>
      • isSigned

        public final boolean isSigned()
        Specified by:
        isSigned in interface swim.api.lane.Lane
      • isSigned

        public ListLaneView<V> isSigned​(boolean isSigned)
        Specified by:
        isSigned in interface swim.api.lane.Lane
        Specified by:
        isSigned in interface swim.api.lane.ListLane<V>
      • close

        public void close()
        Specified by:
        close in interface swim.api.lane.Lane
        Specified by:
        close in class LaneView
      • observe

        public ListLaneView<V> observe​(Object observer)
        Specified by:
        observe in interface swim.api.http.HttpLane<V>
        Specified by:
        observe in interface swim.api.lane.Lane
        Specified by:
        observe in interface swim.api.lane.ListLane<V>
        Specified by:
        observe in interface swim.observable.Observable<V>
        Specified by:
        observe in interface swim.observable.ObservableList<V>
        Overrides:
        observe in class LaneView
      • unobserve

        public ListLaneView<V> unobserve​(Object observer)
        Specified by:
        unobserve in interface swim.api.http.HttpLane<V>
        Specified by:
        unobserve in interface swim.api.lane.Lane
        Specified by:
        unobserve in interface swim.api.lane.ListLane<V>
        Specified by:
        unobserve in interface swim.observable.Observable<V>
        Specified by:
        unobserve in interface swim.observable.ObservableList<V>
        Overrides:
        unobserve in class LaneView
      • willUpdate

        public ListLaneView<V> willUpdate​(swim.observable.function.WillUpdateIndex<V> willUpdate)
        Specified by:
        willUpdate in interface swim.api.lane.ListLane<V>
        Specified by:
        willUpdate in interface swim.observable.ObservableList<V>
      • didUpdate

        public ListLaneView<V> didUpdate​(swim.observable.function.DidUpdateIndex<V> didUpdate)
        Specified by:
        didUpdate in interface swim.api.lane.ListLane<V>
        Specified by:
        didUpdate in interface swim.observable.ObservableList<V>
      • willMove

        public ListLaneView<V> willMove​(swim.observable.function.WillMoveIndex<V> willMove)
        Specified by:
        willMove in interface swim.api.lane.ListLane<V>
        Specified by:
        willMove in interface swim.observable.ObservableList<V>
      • didMove

        public ListLaneView<V> didMove​(swim.observable.function.DidMoveIndex<V> didMove)
        Specified by:
        didMove in interface swim.api.lane.ListLane<V>
        Specified by:
        didMove in interface swim.observable.ObservableList<V>
      • willRemove

        public ListLaneView<V> willRemove​(swim.observable.function.WillRemoveIndex willRemove)
        Specified by:
        willRemove in interface swim.api.lane.ListLane<V>
        Specified by:
        willRemove in interface swim.observable.ObservableList<V>
      • didRemove

        public ListLaneView<V> didRemove​(swim.observable.function.DidRemoveIndex<V> didRemove)
        Specified by:
        didRemove in interface swim.api.lane.ListLane<V>
        Specified by:
        didRemove in interface swim.observable.ObservableList<V>
      • willDrop

        public ListLaneView<V> willDrop​(swim.observable.function.WillDrop willDrop)
        Specified by:
        willDrop in interface swim.api.lane.ListLane<V>
        Specified by:
        willDrop in interface swim.observable.ObservableList<V>
      • didDrop

        public ListLaneView<V> didDrop​(swim.observable.function.DidDrop didDrop)
        Specified by:
        didDrop in interface swim.api.lane.ListLane<V>
        Specified by:
        didDrop in interface swim.observable.ObservableList<V>
      • willTake

        public ListLaneView<V> willTake​(swim.observable.function.WillTake willTake)
        Specified by:
        willTake in interface swim.api.lane.ListLane<V>
        Specified by:
        willTake in interface swim.observable.ObservableList<V>
      • didTake

        public ListLaneView<V> didTake​(swim.observable.function.DidTake didTake)
        Specified by:
        didTake in interface swim.api.lane.ListLane<V>
        Specified by:
        didTake in interface swim.observable.ObservableList<V>
      • willClear

        public ListLaneView<V> willClear​(swim.observable.function.WillClear willClear)
        Specified by:
        willClear in interface swim.api.lane.ListLane<V>
        Specified by:
        willClear in interface swim.observable.ObservableList<V>
      • didClear

        public ListLaneView<V> didClear​(swim.observable.function.DidClear didClear)
        Specified by:
        didClear in interface swim.api.lane.ListLane<V>
        Specified by:
        didClear in interface swim.observable.ObservableList<V>
      • willCommand

        public ListLaneView<V> willCommand​(swim.api.lane.function.WillCommand willCommand)
        Specified by:
        willCommand in interface swim.api.lane.Lane
        Specified by:
        willCommand in interface swim.api.lane.ListLane<V>
        Specified by:
        willCommand in class LaneView
      • didCommand

        public ListLaneView<V> didCommand​(swim.api.lane.function.DidCommand didCommand)
        Specified by:
        didCommand in interface swim.api.lane.Lane
        Specified by:
        didCommand in interface swim.api.lane.ListLane<V>
        Specified by:
        didCommand in class LaneView
      • willUplink

        public ListLaneView<V> willUplink​(swim.api.lane.function.WillUplink willUplink)
        Specified by:
        willUplink in interface swim.api.lane.Lane
        Specified by:
        willUplink in interface swim.api.lane.ListLane<V>
        Specified by:
        willUplink in class LaneView
      • didUplink

        public ListLaneView<V> didUplink​(swim.api.lane.function.DidUplink didUplink)
        Specified by:
        didUplink in interface swim.api.lane.Lane
        Specified by:
        didUplink in interface swim.api.lane.ListLane<V>
        Specified by:
        didUplink in class LaneView
      • willEnter

        public ListLaneView<V> willEnter​(swim.api.lane.function.WillEnter willEnter)
        Specified by:
        willEnter in interface swim.api.lane.Lane
        Specified by:
        willEnter in interface swim.api.lane.ListLane<V>
        Specified by:
        willEnter in class LaneView
      • didEnter

        public ListLaneView<V> didEnter​(swim.api.lane.function.DidEnter didEnter)
        Specified by:
        didEnter in interface swim.api.lane.Lane
        Specified by:
        didEnter in interface swim.api.lane.ListLane<V>
        Specified by:
        didEnter in class LaneView
      • willLeave

        public ListLaneView<V> willLeave​(swim.api.lane.function.WillLeave willLeave)
        Specified by:
        willLeave in interface swim.api.lane.Lane
        Specified by:
        willLeave in interface swim.api.lane.ListLane<V>
        Specified by:
        willLeave in class LaneView
      • didLeave

        public ListLaneView<V> didLeave​(swim.api.lane.function.DidLeave didLeave)
        Specified by:
        didLeave in interface swim.api.lane.Lane
        Specified by:
        didLeave in interface swim.api.lane.ListLane<V>
        Specified by:
        didLeave in class LaneView
      • decodeRequest

        public ListLaneView<V> decodeRequest​(swim.api.http.function.DecodeRequestHttp<Object> decodeRequest)
        Specified by:
        decodeRequest in interface swim.api.http.HttpLane<V>
        Specified by:
        decodeRequest in interface swim.api.lane.Lane
        Specified by:
        decodeRequest in interface swim.api.lane.ListLane<V>
        Specified by:
        decodeRequest in class LaneView
      • willRequest

        public ListLaneView<V> willRequest​(swim.api.http.function.WillRequestHttp<?> willRequest)
        Specified by:
        willRequest in interface swim.api.http.HttpLane<V>
        Specified by:
        willRequest in interface swim.api.lane.Lane
        Specified by:
        willRequest in interface swim.api.lane.ListLane<V>
        Specified by:
        willRequest in class LaneView
      • didRequest

        public ListLaneView<V> didRequest​(swim.api.http.function.DidRequestHttp<Object> didRequest)
        Specified by:
        didRequest in interface swim.api.http.HttpLane<V>
        Specified by:
        didRequest in interface swim.api.lane.Lane
        Specified by:
        didRequest in interface swim.api.lane.ListLane<V>
        Specified by:
        didRequest in class LaneView
      • doRespond

        public ListLaneView<V> doRespond​(swim.api.http.function.DoRespondHttp<Object> doRespond)
        Specified by:
        doRespond in interface swim.api.http.HttpLane<V>
        Specified by:
        doRespond in interface swim.api.lane.Lane
        Specified by:
        doRespond in interface swim.api.lane.ListLane<V>
        Specified by:
        doRespond in class LaneView
      • willRespond

        public ListLaneView<V> willRespond​(swim.api.http.function.WillRespondHttp<?> willRespond)
        Specified by:
        willRespond in interface swim.api.http.HttpLane<V>
        Specified by:
        willRespond in interface swim.api.lane.Lane
        Specified by:
        willRespond in interface swim.api.lane.ListLane<V>
        Specified by:
        willRespond in class LaneView
      • didRespond

        public ListLaneView<V> didRespond​(swim.api.http.function.DidRespondHttp<?> didRespond)
        Specified by:
        didRespond in interface swim.api.http.HttpLane<V>
        Specified by:
        didRespond in interface swim.api.lane.Lane
        Specified by:
        didRespond in interface swim.api.lane.ListLane<V>
        Specified by:
        didRespond in class LaneView
      • dispatchWillUpdate

        protected Map.Entry<Boolean,​V> dispatchWillUpdate​(swim.api.Link link,
                                                                int index,
                                                                V newValue,
                                                                boolean preemptive)
      • dispatchDidUpdate

        protected boolean dispatchDidUpdate​(swim.api.Link link,
                                            int index,
                                            V newValue,
                                            V oldValue,
                                            boolean preemptive)
      • dispatchWillMove

        protected boolean dispatchWillMove​(swim.api.Link link,
                                           int fromIndex,
                                           int toIndex,
                                           V value,
                                           boolean preemptive)
      • dispatchDidMove

        protected boolean dispatchDidMove​(swim.api.Link link,
                                          int fromIndex,
                                          int toIndex,
                                          V value,
                                          boolean preemptive)
      • dispatchWillRemove

        protected boolean dispatchWillRemove​(swim.api.Link link,
                                             int index,
                                             boolean preemptive)
      • dispatchDidRemove

        protected boolean dispatchDidRemove​(swim.api.Link link,
                                            int index,
                                            V oldValue,
                                            boolean preemptive)
      • dispatchWillDrop

        protected boolean dispatchWillDrop​(swim.api.Link link,
                                           int lower,
                                           boolean preemptive)
      • dispatchDidDrop

        protected boolean dispatchDidDrop​(swim.api.Link link,
                                          int lower,
                                          boolean preemptive)
      • dispatchWillTake

        protected boolean dispatchWillTake​(swim.api.Link link,
                                           int upper,
                                           boolean preemptive)
      • dispatchDidTake

        protected boolean dispatchDidTake​(swim.api.Link link,
                                          int upper,
                                          boolean preemptive)
      • dispatchWillClear

        protected boolean dispatchWillClear​(swim.api.Link link,
                                            boolean preemptive)
      • dispatchDidClear

        protected boolean dispatchDidClear​(swim.api.Link link,
                                           boolean preemptive)
      • laneWillInsert

        public V laneWillInsert​(int index,
                                V newValue)
      • laneDidInsert

        public void laneDidInsert​(int index,
                                  V newValue)
      • laneWillUpdate

        public V laneWillUpdate​(int index,
                                V newValue)
      • laneDidUpdate

        public void laneDidUpdate​(int index,
                                  V newValue,
                                  V oldValue)
      • laneWillMove

        public void laneWillMove​(int fromIndex,
                                 int toIndex,
                                 V value)
      • laneDidMove

        public void laneDidMove​(int fromIndex,
                                int toIndex,
                                V value)
      • laneWillRemove

        public void laneWillRemove​(int index)
      • laneDidRemove

        public void laneDidRemove​(int index,
                                  V oldValue)
      • laneWillDrop

        public void laneWillDrop​(int lower)
      • laneDidDrop

        public void laneDidDrop​(int lower)
      • laneWillTake

        public void laneWillTake​(int upper)
      • laneDidTake

        public void laneDidTake​(int upper)
      • laneWillClear

        public void laneWillClear()
      • laneDidClear

        public void laneDidClear()
      • add

        public boolean add​(V v)
        Specified by:
        add in interface Collection<V>
        Specified by:
        add in interface List<V>
      • addAll

        public boolean addAll​(int index,
                              Collection<? extends V> elements)
        Specified by:
        addAll in interface List<V>
      • drop

        public void drop​(int lower)
        Specified by:
        drop in interface swim.api.lane.ListLane<V>
        Specified by:
        drop in interface swim.observable.ObservableList<V>
      • take

        public void take​(int upper)
        Specified by:
        take in interface swim.api.lane.ListLane<V>
        Specified by:
        take in interface swim.observable.ObservableList<V>
      • get

        public V get​(int index)
        Specified by:
        get in interface List<V>
      • set

        public V set​(int index,
                     V element)
        Specified by:
        set in interface List<V>
      • add

        public void add​(int index,
                        V element)
        Specified by:
        add in interface List<V>
      • remove

        public V remove​(int index)
        Specified by:
        remove in interface List<V>
      • subList

        public List<V> subList​(int fromIndex,
                               int toIndex)
        Specified by:
        subList in interface List<V>
      • snapshot

        public swim.util.KeyedList<V> snapshot()
        Specified by:
        snapshot in interface swim.api.lane.ListLane<V>
      • get

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

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

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

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

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

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

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

        public void move​(int fromIndex,
                         int toIndex)
        Specified by:
        move in interface swim.util.KeyedList<V>
        Specified by:
        move in interface swim.observable.ObservableList<V>
      • move

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

        public ListIterator<Object> keyIterator()
        Specified by:
        keyIterator in interface swim.util.KeyedList<V>