Module swim.api

Class ValueDownlinkRecord

All Implemented Interfaces:
Comparable<Item>, Iterable<Item>, Collection<Item>, List<Item>, Debug, Display, Preemptive, RecordOutlet, DidSet<Value>, MapOutlet<Value,Value,Record>, Outlet<Record>, StreamletScope<Value>, Builder<Item,Record>, PairBuilder<Value,Value,Record>

public class ValueDownlinkRecord extends DownlinkRecord implements DidSet<Value>
  • Field Details

  • Constructor Details

  • Method Details

    • downlink

      public ValueDownlink<Value> downlink()
      Specified by:
      downlink in class DownlinkRecord
    • isEmpty

      public boolean isEmpty()
      Description copied from class: Record
      Returns true if this Record has no members.
      Specified by:
      isEmpty in interface Collection<Item>
      Specified by:
      isEmpty in interface List<Item>
      Specified by:
      isEmpty in class Record
    • 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
    • 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
    • containsKey

      public boolean containsKey(String 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. Equivalent to Record.containsKey(Value), but avoids boxing the key string into a Text value.
      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
    • get

      public Value get(String 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. Equivalent to Record.get(Value), but avoids boxing the key string into a Text value.
      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
    • getAttr

      public Value getAttr(String 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. Equivalent to Record.getAttr(Text), but avoids boxing the key string into a Text value.
      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
    • getSlot

      public Value getSlot(String 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. Equivalent to Record.getSlot(Value), but avoids boxing the key string into a Text value.
      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
    • getField

      public Field getField(String 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. Equivalent to Record.getField(Value), but avoids boxing the key string into a Text value.
      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
    • put

      public Value put(Value key, Value newValue)
      Overrides:
      put in class Record
    • put

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

      public Value putAttr(Text key, Value newValue)
      Overrides:
      putAttr in class Record
    • putAttr

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

      public Value putSlot(Value key, Value newValue)
      Overrides:
      putSlot in class Record
    • putSlot

      public Value putSlot(String key, Value newValue)
      Overrides:
      putSlot in class Record
    • 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
    • remove

      public Item remove(int index)
      Specified by:
      remove in interface List<Item>
      Specified by:
      remove in class Record
    • removeKey

      public boolean removeKey(Value key)
      Overrides:
      removeKey in class Record
    • removeKey

      public boolean removeKey(String key)
      Overrides:
      removeKey in class Record
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<Item>
      Specified by:
      clear in interface List<Item>
      Specified by:
      clear in class Record
    • keyIterator

      public Iterator<Value> keyIterator()
      Description copied from interface: MapOutlet
      Returns an Iterator over the keys in the current state of this MapOutlet.
      Specified by:
      keyIterator in interface MapOutlet<Value,Value,Record>
      Specified by:
      keyIterator in class AbstractRecordOutlet
    • didSet

      public void didSet(Value newValue, Value oldValue)
      Specified by:
      didSet in interface DidSet<Value>