Package swim.dataflow

Class AbstractRecordStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>

  • All Implemented Interfaces:
    Comparable<swim.structure.Item>, Iterable<swim.structure.Item>, Collection<swim.structure.Item>, List<swim.structure.Item>, swim.codec.Debug, swim.codec.Display, swim.streamlet.GenericStreamlet<I,​O>, swim.streamlet.Streamlet<I,​O>, swim.streamlet.StreamletScope<O>, swim.util.Builder<swim.structure.Item,​swim.structure.Record>

    public abstract class AbstractRecordStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
    extends RecordStreamlet<I,​O>
    implements swim.streamlet.GenericStreamlet<I,​O>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected swim.streamlet.StreamletContext context  
      protected swim.streamlet.StreamletScope<? extends O> scope  
      protected int version  
      • Fields inherited from class swim.structure.Record

        FLAGS
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, swim.structure.Item item)  
      boolean add​(swim.structure.Item item)  
      void bindInput​(String key, swim.streamlet.Outlet<? extends I> input)  
      <T> T castInput​(String key, swim.structure.Form<T> form)  
      <T> T castInput​(String key, swim.structure.Form<T> form, T orElse)  
      <T> T castInput​(swim.streamlet.Inlet<? extends I> inlet, swim.structure.Form<T> form)  
      <T> T castInput​(swim.streamlet.Inlet<? extends I> inlet, swim.structure.Form<T> form, T orElse)  
      void clear()  
      <T> T coerceInput​(String key, swim.structure.Form<T> form)  
      <T> T coerceInput​(String key, swim.structure.Form<T> form, T orElse)  
      <T> T coerceInput​(swim.streamlet.Inlet<? extends I> inlet, swim.structure.Form<T> form)  
      <T> T coerceInput​(swim.streamlet.Inlet<? extends I> inlet, swim.structure.Form<T> form, T orElse)  
      static <I extends swim.structure.Value,​O extends swim.structure.Value>
      void
      compileInlets​(Class<?> streamletClass, RecordStreamlet<I,​O> streamlet)  
      boolean containsKey​(String key)  
      boolean containsKey​(swim.structure.Value key)  
      protected void didInvalidate()  
      void didInvalidateInlet​(swim.streamlet.Inlet<? extends I> inlet)  
      void didInvalidateOutlet​(swim.streamlet.Outlet<? super O> outlet)  
      protected void didReconcile​(int version)  
      void didReconcileInlet​(swim.streamlet.Inlet<? extends I> inlet, int version)  
      void didReconcileOutlet​(swim.streamlet.Outlet<? super O> outlet, int version)  
      void disconnectInputs()  
      void disconnectOutputs()  
      swim.structure.Item get​(int index)  
      swim.structure.Value get​(String key)  
      swim.structure.Value get​(swim.structure.Value key)  
      swim.structure.Value getAttr​(String key)  
      swim.structure.Value getAttr​(swim.structure.Text key)  
      swim.structure.Field getField​(String key)  
      swim.structure.Field getField​(swim.structure.Value key)  
      <I2 extends I>
      I2
      getInput​(String key)  
      <I2 extends I>
      I2
      getInput​(String key, I2 orElse)  
      <I2 extends I>
      I2
      getInput​(swim.streamlet.Inlet<I2> inlet)  
      <I2 extends I>
      I2
      getInput​(swim.streamlet.Inlet<I2> inlet, I2 orElse)  
      swim.structure.Item getItem​(int index)  
      O getOutput​(String key)  
      O getOutput​(swim.streamlet.Outlet<? super O> outlet)  
      swim.structure.Value getSlot​(String key)  
      swim.structure.Value getSlot​(swim.structure.Value key)  
      protected <I2 extends I>
      swim.streamlet.Inlet<I2>
      inlet()  
      swim.streamlet.Inlet<I> inlet​(String key)  
      protected <I2 extends I,​O2>
      swim.streamlet.Inoutlet<I2,​O2>
      inoutlet()  
      void invalidate()  
      boolean isEmpty()  
      protected void onInvalidate()  
      protected void onInvalidateOutlets()  
      protected void onReconcile​(int version)  
      protected void onReconcileInlets​(int version)  
      protected void onReconcileOutlets​(int version)  
      protected <O2 extends swim.structure.Value>
      swim.streamlet.Outlet<O2>
      outlet()  
      swim.streamlet.Outlet<O> outlet​(String key)  
      swim.structure.Value put​(String key, swim.structure.Value newValue)  
      swim.structure.Value put​(swim.structure.Value key, swim.structure.Value newValue)  
      swim.structure.Value putAttr​(String key, swim.structure.Value newValue)  
      swim.structure.Value putAttr​(swim.structure.Text key, swim.structure.Value newValue)  
      swim.structure.Value putSlot​(String key, swim.structure.Value newValue)  
      swim.structure.Value putSlot​(swim.structure.Value key, swim.structure.Value newValue)  
      void reconcile​(int version)  
      swim.structure.Item remove​(int index)  
      boolean removeKey​(String key)  
      boolean removeKey​(swim.structure.Value key)  
      swim.structure.Item setItem​(int index, swim.structure.Item item)  
      void setStreamletContext​(swim.streamlet.StreamletContext context)  
      void setStreamletScope​(swim.streamlet.StreamletScope<? extends O> scope)  
      int size()  
      swim.streamlet.StreamletContext streamletContext()  
      swim.streamlet.StreamletScope<? extends O> streamletScope()  
      void unbindInput​(String key)  
      protected void willInvalidate()  
      void willInvalidateInlet​(swim.streamlet.Inlet<? extends I> inlet)  
      void willInvalidateOutlet​(swim.streamlet.Outlet<? super O> outlet)  
      protected void willReconcile​(int version)  
      void willReconcileInlet​(swim.streamlet.Inlet<? extends I> inlet, int version)  
      void willReconcileOutlet​(swim.streamlet.Outlet<? super O> outlet, int version)  
      • Methods inherited from class swim.structure.Record

        add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, alias, appended, appended, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, attr, bind, body, branch, commit, compareTo, compareTo, concat, contains, contains, containsAll, containsValue, create, create, debug, empty, entrySet, equals, evaluate, fieldCount, fieldIterator, fieldSet, flattened, hashCode, head, header, headers, indexOf, isAliased, isArray, isMutable, isObject, item, item, item, item, item, item, item, iterator, keyIterator, keySet, lastIndexOf, length, listIterator, listIterator, of, of, of, prepended, prepended, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putAttr, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, putSlot, remove, removeAll, removed, removed, retainAll, set, setItem, setItem, setItem, setItem, setItem, setItem, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, slot, stringValue, stringValue, subList, substitute, tag, tail, target, toArray, toArray, typeOrder, unflattened, updated, updated, updatedAttr, updatedAttr, updatedSlot, updatedSlot, valueCount, valueIterator, values
      • Methods inherited from class swim.structure.Value

        absent, and, and, bitwiseAnd, bitwiseAnd, bitwiseNot, bitwiseOr, bitwiseOr, bitwiseXor, bitwiseXor, booleanValue, booleanValue, builder, byteValue, byteValue, charValue, charValue, conditional, conditional, divide, divide, doubleValue, doubleValue, eq, eq, extant, floatValue, floatValue, fromObject, ge, ge, gt, gt, integerValue, integerValue, intValue, intValue, inverse, isDefined, isDistinct, key, keyEquals, lambda, le, le, longValue, longValue, lt, lt, minus, minus, modulo, modulo, ne, ne, negative, not, numberValue, numberValue, or, or, plus, plus, positive, shortValue, shortValue, times, times, toValue
      • Methods inherited from class swim.structure.Item

        appended, appended, appended, appended, appended, appended, cast, cast, coerce, coerce, display, evaluate, filter, filter, globalScope, invoke, max, min, precedence, prepended, prepended, prepended, prepended, prepended, prepended, substitute, toString, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updated, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedAttr, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot, updatedSlot
    • Field Detail

      • scope

        protected swim.streamlet.StreamletScope<? extends O extends swim.structure.Value> scope
      • context

        protected swim.streamlet.StreamletContext context
      • version

        protected int version
    • Constructor Detail

      • AbstractRecordStreamlet

        public AbstractRecordStreamlet​(swim.streamlet.StreamletScope<? extends O> scope)
      • AbstractRecordStreamlet

        public AbstractRecordStreamlet()
    • Method Detail

      • streamletScope

        public swim.streamlet.StreamletScope<? extends O> streamletScope()
        Specified by:
        streamletScope in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
        Specified by:
        streamletScope in interface swim.streamlet.StreamletScope<I extends swim.structure.Value>
      • setStreamletScope

        public void setStreamletScope​(swim.streamlet.StreamletScope<? extends O> scope)
        Specified by:
        setStreamletScope in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • streamletContext

        public swim.streamlet.StreamletContext streamletContext()
        Specified by:
        streamletContext in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
        Specified by:
        streamletContext in interface swim.streamlet.StreamletScope<I extends swim.structure.Value>
      • setStreamletContext

        public void setStreamletContext​(swim.streamlet.StreamletContext context)
        Specified by:
        setStreamletContext in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Collection<I extends swim.structure.Value>
        Specified by:
        isEmpty in interface List<I extends swim.structure.Value>
        Specified by:
        isEmpty in class swim.structure.Record
      • size

        public int size()
        Specified by:
        size in interface Collection<I extends swim.structure.Value>
        Specified by:
        size in interface List<I extends swim.structure.Value>
        Specified by:
        size in class swim.structure.Record
      • containsKey

        public boolean containsKey​(swim.structure.Value key)
        Overrides:
        containsKey in class swim.structure.Record
      • containsKey

        public boolean containsKey​(String key)
        Overrides:
        containsKey in class swim.structure.Record
      • get

        public swim.structure.Value get​(swim.structure.Value key)
        Overrides:
        get in class swim.structure.Record
      • get

        public swim.structure.Value get​(String key)
        Overrides:
        get in class swim.structure.Record
      • getAttr

        public swim.structure.Value getAttr​(swim.structure.Text key)
        Overrides:
        getAttr in class swim.structure.Record
      • getAttr

        public swim.structure.Value getAttr​(String key)
        Overrides:
        getAttr in class swim.structure.Record
      • getSlot

        public swim.structure.Value getSlot​(swim.structure.Value key)
        Overrides:
        getSlot in class swim.structure.Record
      • getSlot

        public swim.structure.Value getSlot​(String key)
        Overrides:
        getSlot in class swim.structure.Record
      • getField

        public swim.structure.Field getField​(swim.structure.Value key)
        Overrides:
        getField in class swim.structure.Record
      • getField

        public swim.structure.Field getField​(String key)
        Overrides:
        getField in class swim.structure.Record
      • get

        public swim.structure.Item get​(int index)
        Specified by:
        get in interface List<I extends swim.structure.Value>
        Specified by:
        get in class swim.structure.Record
      • getItem

        public swim.structure.Item getItem​(int index)
        Specified by:
        getItem in class swim.structure.Record
      • put

        public swim.structure.Value put​(swim.structure.Value key,
                                        swim.structure.Value newValue)
        Overrides:
        put in class swim.structure.Record
      • put

        public swim.structure.Value put​(String key,
                                        swim.structure.Value newValue)
        Overrides:
        put in class swim.structure.Record
      • putAttr

        public swim.structure.Value putAttr​(swim.structure.Text key,
                                            swim.structure.Value newValue)
        Overrides:
        putAttr in class swim.structure.Record
      • putAttr

        public swim.structure.Value putAttr​(String key,
                                            swim.structure.Value newValue)
        Overrides:
        putAttr in class swim.structure.Record
      • putSlot

        public swim.structure.Value putSlot​(swim.structure.Value key,
                                            swim.structure.Value newValue)
        Overrides:
        putSlot in class swim.structure.Record
      • putSlot

        public swim.structure.Value putSlot​(String key,
                                            swim.structure.Value newValue)
        Overrides:
        putSlot in class swim.structure.Record
      • setItem

        public swim.structure.Item setItem​(int index,
                                           swim.structure.Item item)
        Specified by:
        setItem in class swim.structure.Record
      • add

        public boolean add​(swim.structure.Item item)
        Specified by:
        add in interface swim.util.Builder<I extends swim.structure.Value,​O extends swim.structure.Value>
        Specified by:
        add in interface Collection<I extends swim.structure.Value>
        Specified by:
        add in interface List<I extends swim.structure.Value>
        Specified by:
        add in class swim.structure.Record
      • add

        public void add​(int index,
                        swim.structure.Item item)
        Specified by:
        add in interface List<I extends swim.structure.Value>
        Specified by:
        add in class swim.structure.Record
      • remove

        public swim.structure.Item remove​(int index)
        Specified by:
        remove in interface List<I extends swim.structure.Value>
        Specified by:
        remove in class swim.structure.Record
      • removeKey

        public boolean removeKey​(swim.structure.Value key)
        Overrides:
        removeKey in class swim.structure.Record
      • removeKey

        public boolean removeKey​(String key)
        Overrides:
        removeKey in class swim.structure.Record
      • clear

        public void clear()
        Specified by:
        clear in interface Collection<I extends swim.structure.Value>
        Specified by:
        clear in interface List<I extends swim.structure.Value>
        Specified by:
        clear in class swim.structure.Record
      • inlet

        public swim.streamlet.Inlet<I> inlet​(String key)
        Specified by:
        inlet in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • inlet

        protected <I2 extends I> swim.streamlet.Inlet<I2> inlet()
      • bindInput

        public void bindInput​(String key,
                              swim.streamlet.Outlet<? extends I> input)
        Specified by:
        bindInput in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • unbindInput

        public void unbindInput​(String key)
        Specified by:
        unbindInput in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • outlet

        public swim.streamlet.Outlet<O> outlet​(String key)
        Specified by:
        outlet in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
        Specified by:
        outlet in interface swim.streamlet.StreamletScope<I extends swim.structure.Value>
      • outlet

        protected <O2 extends swim.structure.Value> swim.streamlet.Outlet<O2> outlet()
      • inoutlet

        protected <I2 extends I,​O2> swim.streamlet.Inoutlet<I2,​O2> inoutlet()
      • invalidate

        public void invalidate()
        Specified by:
        invalidate in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • reconcile

        public void reconcile​(int version)
        Specified by:
        reconcile in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • getInput

        public <I2 extends I> I2 getInput​(swim.streamlet.Inlet<I2> inlet)
      • getInput

        public <I2 extends I> I2 getInput​(String key)
      • getInput

        public <I2 extends I> I2 getInput​(swim.streamlet.Inlet<I2> inlet,
                                          I2 orElse)
      • getInput

        public <I2 extends I> I2 getInput​(String key,
                                          I2 orElse)
      • castInput

        public <T> T castInput​(swim.streamlet.Inlet<? extends I> inlet,
                               swim.structure.Form<T> form)
      • castInput

        public <T> T castInput​(String key,
                               swim.structure.Form<T> form)
      • castInput

        public <T> T castInput​(swim.streamlet.Inlet<? extends I> inlet,
                               swim.structure.Form<T> form,
                               T orElse)
      • castInput

        public <T> T castInput​(String key,
                               swim.structure.Form<T> form,
                               T orElse)
      • coerceInput

        public <T> T coerceInput​(swim.streamlet.Inlet<? extends I> inlet,
                                 swim.structure.Form<T> form)
      • coerceInput

        public <T> T coerceInput​(String key,
                                 swim.structure.Form<T> form)
      • coerceInput

        public <T> T coerceInput​(swim.streamlet.Inlet<? extends I> inlet,
                                 swim.structure.Form<T> form,
                                 T orElse)
      • coerceInput

        public <T> T coerceInput​(String key,
                                 swim.structure.Form<T> form,
                                 T orElse)
      • getOutput

        public O getOutput​(swim.streamlet.Outlet<? super O> outlet)
        Specified by:
        getOutput in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • getOutput

        public O getOutput​(String key)
      • disconnectInputs

        public void disconnectInputs()
        Specified by:
        disconnectInputs in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • disconnectOutputs

        public void disconnectOutputs()
        Specified by:
        disconnectOutputs in interface swim.streamlet.Streamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • willInvalidateInlet

        public void willInvalidateInlet​(swim.streamlet.Inlet<? extends I> inlet)
        Specified by:
        willInvalidateInlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • didInvalidateInlet

        public void didInvalidateInlet​(swim.streamlet.Inlet<? extends I> inlet)
        Specified by:
        didInvalidateInlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • willReconcileInlet

        public void willReconcileInlet​(swim.streamlet.Inlet<? extends I> inlet,
                                       int version)
        Specified by:
        willReconcileInlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • didReconcileInlet

        public void didReconcileInlet​(swim.streamlet.Inlet<? extends I> inlet,
                                      int version)
        Specified by:
        didReconcileInlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • willInvalidateOutlet

        public void willInvalidateOutlet​(swim.streamlet.Outlet<? super O> outlet)
        Specified by:
        willInvalidateOutlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • didInvalidateOutlet

        public void didInvalidateOutlet​(swim.streamlet.Outlet<? super O> outlet)
        Specified by:
        didInvalidateOutlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • willReconcileOutlet

        public void willReconcileOutlet​(swim.streamlet.Outlet<? super O> outlet,
                                        int version)
        Specified by:
        willReconcileOutlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • didReconcileOutlet

        public void didReconcileOutlet​(swim.streamlet.Outlet<? super O> outlet,
                                       int version)
        Specified by:
        didReconcileOutlet in interface swim.streamlet.GenericStreamlet<I extends swim.structure.Value,​O extends swim.structure.Value>
      • willInvalidate

        protected void willInvalidate()
      • onInvalidate

        protected void onInvalidate()
      • onInvalidateOutlets

        protected void onInvalidateOutlets()
      • didInvalidate

        protected void didInvalidate()
      • willReconcile

        protected void willReconcile​(int version)
      • onReconcileInlets

        protected void onReconcileInlets​(int version)
      • onReconcile

        protected void onReconcile​(int version)
      • onReconcileOutlets

        protected void onReconcileOutlets​(int version)
      • didReconcile

        protected void didReconcile​(int version)
      • compileInlets

        public static <I extends swim.structure.Value,​O extends swim.structure.Value> void compileInlets​(Class<?> streamletClass,
                                                                                                               RecordStreamlet<I,​O> streamlet)