Package swim.dataflow

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

java.lang.Object
swim.structure.Item
swim.structure.Value
swim.structure.Record
swim.dataflow.RecordStreamlet<I,O>
swim.dataflow.AbstractRecordStreamlet<I,O>
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>, swim.util.PairBuilder<swim.structure.Value,swim.structure.Value,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
     
    protected swim.streamlet.StreamletScope<? extends O>
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    AbstractRecordStreamlet(swim.streamlet.StreamletScope<? extends O> scope)
     
  • Method Summary

    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
     
    <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
     
    boolean
    containsKey(swim.structure.Value key)
     
    void
     
    protected void
     
    void
    didDecohereInlet(swim.streamlet.Inlet<? extends I> inlet)
     
    void
    didDecohereOutlet(swim.streamlet.Outlet<? super O> outlet)
     
    protected void
    didRecohere(int version)
     
    void
    didRecohereInlet(swim.streamlet.Inlet<? extends I> inlet, int version)
     
    void
    didRecohereOutlet(swim.streamlet.Outlet<? super O> outlet, int version)
     
    void
     
    void
     
    swim.structure.Item
    get(int index)
     
    swim.structure.Value
    get(String key)
     
    swim.structure.Value
    get(swim.structure.Value key)
     
    swim.structure.Value
     
    swim.structure.Value
    getAttr(swim.structure.Text key)
     
    swim.structure.Field
     
    swim.structure.Field
    getField(swim.structure.Value key)
     
    <I2 extends I>
    I2
     
    <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)
     
     
    getOutput(swim.streamlet.Outlet<? super O> outlet)
     
    swim.structure.Value
     
    swim.structure.Value
    getSlot(swim.structure.Value key)
     
    protected <I2 extends I>
    swim.streamlet.Inlet<I2>
     
    swim.streamlet.Inlet<I>
     
    protected <I2 extends I, O2>
    swim.streamlet.Inoutlet<I2,O2>
     
    boolean
     
    protected void
     
    protected void
     
    protected void
    onRecohere(int version)
     
    protected void
    onRecohereInlets(int version)
     
    protected void
    onRecohereOutlets(int version)
     
    protected <O2 extends swim.structure.Value>
    swim.streamlet.Outlet<O2>
     
    swim.streamlet.Outlet<O>
     
    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
    recohere(int version)
     
    swim.structure.Item
    remove(int index)
     
    boolean
     
    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
     
    swim.streamlet.StreamletContext
     
    swim.streamlet.StreamletScope<? extends O>
     
    void
     
    protected void
     
    void
    willDecohereInlet(swim.streamlet.Inlet<? extends I> inlet)
     
    void
    willDecohereOutlet(swim.streamlet.Outlet<? super O> outlet)
     
    protected void
    willRecohere(int version)
     
    void
    willRecohereInlet(swim.streamlet.Inlet<? extends I> inlet, int version)
     
    void
    willRecohereOutlet(swim.streamlet.Outlet<? super O> outlet, int version)
     

    Methods inherited from class swim.dataflow.RecordStreamlet

    compile, compileInlet, isConstant

    Methods inherited from class swim.structure.Record

    add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, alias, appended, appended, asMutable, 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, isDefinite, 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, removeIf, stream, toArray

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface java.util.List

    replaceAll, sort, spliterator
  • Field Details

    • scope

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

      protected swim.streamlet.StreamletContext context
    • version

      protected int version
  • Constructor Details

    • AbstractRecordStreamlet

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

      public AbstractRecordStreamlet()
  • Method Details

    • 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()
    • decohere

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

      public void recohere(int version)
      Specified by:
      recohere 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>
    • willDecohereInlet

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

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

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

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

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

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

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

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

      protected void willDecohere()
    • onDecohere

      protected void onDecohere()
    • onDecohereOutlets

      protected void onDecohereOutlets()
    • didDecohere

      protected void didDecohere()
    • willRecohere

      protected void willRecohere(int version)
    • onRecohereInlets

      protected void onRecohereInlets(int version)
    • onRecohere

      protected void onRecohere(int version)
    • onRecohereOutlets

      protected void onRecohereOutlets(int version)
    • didRecohere

      protected void didRecohere(int version)
    • compileInlets

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