Package swim.dataflow

Class RecordModel

    • Constructor Detail

      • RecordModel

        public RecordModel​(Record state)
      • RecordModel

        public RecordModel()
    • Method Detail

      • isArray

        public boolean isArray()
        Description copied from class: Record
        Returns true if this Record has only Value members–no Field members.
        Overrides:
        isArray in class Record
      • isObject

        public boolean isObject()
        Description copied from class: Record
        Returns true if this Record has only Field members–no Value members.
        Overrides:
        isObject in class Record
      • size

        public int size()
        Description copied from class: Record
        Returns the number of members contained in this Record.
        Specified by:
        size in interface Collection<Item>
        Specified by:
        size in interface List<Item>
        Specified by:
        size in class Record
      • fieldCount

        public int fieldCount()
        Description copied from class: Record
        Returns the number of Field members contained in this Record.
        Overrides:
        fieldCount in class Record
      • valueCount

        public int valueCount()
        Description copied from class: Record
        Returns the number of Value members contained in this Record.
        Overrides:
        valueCount in class Record
      • containsKey

        public boolean containsKey​(Value key)
        Description copied from class: Record
        Returns true if this Record has a Field member with a key that is equal to the given key; otherwise returns false if this Record has no Field member with a key equal to the given key.
        Specified by:
        containsKey in interface MapOutlet<Value,​Value,​Record>
        Overrides:
        containsKey in class Record
      • get

        public Value get​(Value key)
        Description copied from class: Record
        Returns the value of the last Field member of this Record whose key is equal to the given key; returns Absent if this Record has no Field member with a key equal to the given key.
        Specified by:
        get in interface MapOutlet<Value,​Value,​Record>
        Overrides:
        get in class Record
      • getAttr

        public Value getAttr​(Text key)
        Description copied from class: Record
        Returns the value of the last Attr member of this Record whose key is equal to the given key; returns Absent if this Record has no Attr member with a key equal to the given key.
        Overrides:
        getAttr in class Record
      • getSlot

        public Value getSlot​(Value key)
        Description copied from class: Record
        Returns the value of the last Slot member of this Record whose key is equal to the given key; returns Absent if this Record has no Slot member with a key equal to the given key.
        Overrides:
        getSlot in class Record
      • getField

        public Field getField​(Value key)
        Description copied from class: Record
        Returns the last Field member of this Record whose key is equal to the given key; returns null if this Record has no Field member with a key equal to the given key.
        Overrides:
        getField in class Record
      • get

        public Item get​(int index)
        Description copied from class: Record
        Returns the member of this Record at the given index, if the index is greater than or equal to zero, and less than the length of this Record.
        Specified by:
        get in interface List<Item>
        Specified by:
        get in class Record
      • getItem

        public Item getItem​(int index)
        Description copied from class: Record
        Returns the member of this Record at the given index, if the index is greater than or equal to zero, and less than the length of this Record; otherwise returns Absent if the index is out of bounds.
        Specified by:
        getItem in class Record
      • bindValue

        public void bindValue​(Value key,
                              Value expr)
      • setItem

        public Item setItem​(int index,
                            Item newItem)
        Description copied from class: Record
        Replaces the member of this Record at the given index with a new item, returning the previous Item at the given index, if the index is greater than or equal to zero, and less than the length of this Record.
        Specified by:
        setItem in class Record
      • add

        public boolean add​(Item item)
        Description copied from interface: Builder
        Adds a single input value to this builder, returning true if the state of the builder changed.
        Specified by:
        add in interface Builder<Item,​Record>
        Specified by:
        add in interface Collection<Item>
        Specified by:
        add in interface List<Item>
        Specified by:
        add in class Record
      • add

        public void add​(int index,
                        Item item)
        Specified by:
        add in interface List<Item>
        Specified by:
        add in class Record
      • disconnectInputs

        public void disconnectInputs()
        Description copied from interface: Outlet
        Disconnects all Inlets dominated by this Outlet in the dataflow dependency graph. Used to recursively clean up chains of combinators passing through this Outlet.
        Specified by:
        disconnectInputs in interface Outlet<Record>
        Overrides:
        disconnectInputs in class AbstractRecordOutlet
      • materialize

        public void materialize​(Record record)
      • materializeItem

        public void materializeItem​(Item item)
      • materializeField

        public void materializeField​(Field field)
      • materializeValue

        public void materializeValue​(Value value)
      • compile

        public void compile​(Record record)
      • compileItem

        public void compileItem​(Item item,
                                int index)
      • compileField

        public void compileField​(Field field,
                                 int index)
      • compileValue

        public void compileValue​(Value value,
                                 int index)
      • reify

        public void reify​(Reifier reifier)
      • reify

        public void reify()
      • globalScope

        public static RecordModel globalScope()