Package swim.dataflow

Class RecordModel

java.lang.Object
swim.structure.Item
swim.structure.Value
swim.structure.Record
swim.dataflow.AbstractRecordOutlet
swim.dataflow.RecordModel
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, RecordOutlet, swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record>, swim.streamlet.Outlet<swim.structure.Record>, swim.streamlet.StreamletScope<swim.structure.Value>, swim.util.Builder<swim.structure.Item,swim.structure.Record>, swim.util.PairBuilder<swim.structure.Value,swim.structure.Value,swim.structure.Record>
Direct Known Subclasses:
RecordScope

public class RecordModel extends AbstractRecordOutlet
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected swim.collections.HashTrieMap<swim.structure.Value,RecordFieldUpdater>
     
    protected swim.structure.Record
     

    Fields inherited from class swim.dataflow.AbstractRecordOutlet

    effects, outlets, outputs, version
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    RecordModel(swim.structure.Record state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int index, swim.structure.Item item)
     
    boolean
    add(swim.structure.Item item)
     
    void
    bindValue(swim.structure.Value key, swim.structure.Value expr)
     
    void
     
    void
    compile(swim.structure.Record record)
     
    void
    compileField(swim.structure.Field field, int index)
     
    void
    compileItem(swim.structure.Item item, int index)
     
    void
    compileValue(swim.structure.Value value, int index)
     
    boolean
    containsKey(swim.structure.Value key)
     
    boolean
    containsOwnKey(swim.structure.Value key)
     
    create(swim.structure.Record record)
     
    void
     
    int
     
    swim.structure.Item
    get(int index)
     
    swim.structure.Value
    get(swim.structure.Value key)
     
    swim.structure.Value
    getAttr(swim.structure.Text key)
     
    swim.structure.Field
    getField(swim.structure.Value key)
     
    swim.structure.Item
    getItem(int index)
     
    swim.structure.Value
    getSlot(swim.structure.Value key)
     
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    final Iterator<swim.structure.Value>
     
    int
     
    void
    materialize(swim.structure.Record record)
     
    void
    materializeField(swim.structure.Field field)
     
    void
    materializeItem(swim.structure.Item item)
     
    void
    materializeValue(swim.structure.Value value)
     
    swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record>
     
    of()
     
    of(Object object)
     
    of(Object... objects)
     
    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
     
    void
    reify(Reifier reifier)
     
    swim.structure.Item
    reifyItem(swim.structure.Item item, Reifier reifier)
     
    swim.structure.Item
    remove(int index)
     
    swim.structure.Item
    setItem(int index, swim.structure.Item newItem)
     
    int
     
    swim.structure.Record
    subList(int fromIndex, int toIndex)
     
    int
     

    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, containsKey, containsValue, create, create, debug, empty, entrySet, equals, evaluate, fieldIterator, fieldSet, flattened, get, getAttr, getField, getSlot, hashCode, head, header, headers, isAliased, isConstant, isDefinite, isMutable, item, item, item, item, item, item, item, iterator, keySet, length, listIterator, listIterator, 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, removeKey, removeKey, 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, substitute, tag, tail, target, toArray, toArray, typeOrder, unflattened, updated, updated, updatedAttr, updatedAttr, updatedSlot, updatedSlot, 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, 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

    Methods inherited from interface swim.streamlet.MapOutlet

    filter, map, reduce, watch

    Methods inherited from interface swim.streamlet.Outlet

    map, watch
  • Field Details

    • state

      protected swim.structure.Record state
    • fieldUpdaters

      protected swim.collections.HashTrieMap<swim.structure.Value,RecordFieldUpdater> fieldUpdaters
  • Constructor Details

    • RecordModel

      public RecordModel(swim.structure.Record state)
    • RecordModel

      public RecordModel()
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<swim.structure.Item>
      Specified by:
      isEmpty in interface List<swim.structure.Item>
      Specified by:
      isEmpty in class swim.structure.Record
    • isArray

      public boolean isArray()
      Overrides:
      isArray in class swim.structure.Record
    • isObject

      public boolean isObject()
      Overrides:
      isObject in class swim.structure.Record
    • size

      public int size()
      Specified by:
      size in interface Collection<swim.structure.Item>
      Specified by:
      size in interface List<swim.structure.Item>
      Specified by:
      size in class swim.structure.Record
    • fieldCount

      public int fieldCount()
      Overrides:
      fieldCount in class swim.structure.Record
    • valueCount

      public int valueCount()
      Overrides:
      valueCount in class swim.structure.Record
    • containsKey

      public boolean containsKey(swim.structure.Value key)
      Specified by:
      containsKey in interface swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record>
      Overrides:
      containsKey in class swim.structure.Record
    • containsOwnKey

      public boolean containsOwnKey(swim.structure.Value key)
      Overrides:
      containsOwnKey in class AbstractRecordOutlet
    • indexOf

      public int indexOf(Object item)
      Specified by:
      indexOf in interface List<swim.structure.Item>
      Overrides:
      indexOf in class swim.structure.Record
    • lastIndexOf

      public int lastIndexOf(Object item)
      Specified by:
      lastIndexOf in interface List<swim.structure.Item>
      Overrides:
      lastIndexOf in class swim.structure.Record
    • get

      public swim.structure.Value get(swim.structure.Value key)
      Specified by:
      get in interface swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record>
      Overrides:
      get in class swim.structure.Record
    • getAttr

      public swim.structure.Value getAttr(swim.structure.Text 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
    • getField

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

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

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

      public void bindValue(swim.structure.Value key, swim.structure.Value expr)
    • 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 newItem)
      Specified by:
      setItem in class swim.structure.Record
    • add

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

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

      public swim.structure.Item remove(int index)
      Specified by:
      remove in interface List<swim.structure.Item>
      Specified by:
      remove in class swim.structure.Record
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<swim.structure.Item>
      Specified by:
      clear in interface List<swim.structure.Item>
      Specified by:
      clear in class swim.structure.Record
    • subList

      public swim.structure.Record subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<swim.structure.Item>
      Overrides:
      subList in class swim.structure.Record
    • keyIterator

      public final Iterator<swim.structure.Value> keyIterator()
      Specified by:
      keyIterator in interface swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record>
      Specified by:
      keyIterator in class AbstractRecordOutlet
    • disconnectInputs

      public void disconnectInputs()
      Specified by:
      disconnectInputs in interface swim.streamlet.Outlet<swim.structure.Record>
      Overrides:
      disconnectInputs in class AbstractRecordOutlet
    • memoize

      public swim.streamlet.MapOutlet<swim.structure.Value,swim.structure.Value,swim.structure.Record> memoize()
    • materialize

      public void materialize(swim.structure.Record record)
    • materializeItem

      public void materializeItem(swim.structure.Item item)
    • materializeField

      public void materializeField(swim.structure.Field field)
    • materializeValue

      public void materializeValue(swim.structure.Value value)
    • compile

      public void compile(swim.structure.Record record)
    • compileItem

      public void compileItem(swim.structure.Item item, int index)
    • compileField

      public void compileField(swim.structure.Field field, int index)
    • compileValue

      public void compileValue(swim.structure.Value value, int index)
    • reify

      public void reify(Reifier reifier)
    • reify

      public void reify()
    • reifyItem

      public swim.structure.Item reifyItem(swim.structure.Item item, Reifier reifier)
    • create

      public static RecordModel create(swim.structure.Record record)
    • of

      public static RecordModel of()
    • of

      public static RecordModel of(Object object)
    • of

      public static RecordModel of(Object... objects)
    • globalScope

      public static RecordModel globalScope()