Class Attr

All Implemented Interfaces:
Comparable<Item>, Iterable<Item>, Map.Entry<Value,Value>, Debug, Display

public final class Attr extends Field
  • Method Details

    • isConstant

      public boolean isConstant()
      Description copied from class: Item
      Returns true if this Item always evaluates to the same Item.
      Specified by:
      isConstant in class Item
    • name

      public String name()
    • key

      public Text key()
      Description copied from class: Field
      Returns the key component of this Field.
      Specified by:
      key in class Field
    • value

      public Value value()
      Description copied from class: Field
      Returns the value component of this Field.
      Specified by:
      value in class Field
    • setValue

      public Value setValue(Value newValue)
      Description copied from class: Field
      Sets the value of this Field to the new value, returning the old value.
      Specified by:
      setValue in interface Map.Entry<Value,Value>
      Specified by:
      setValue in class Field
    • updatedValue

      public Attr updatedValue(Value value)
      Description copied from class: Field
      Returns a copy of this Field with the updated value.
      Specified by:
      updatedValue in class Field
    • bitwiseOr

      public Item bitwiseOr(Item that)
      Specified by:
      bitwiseOr in class Item
    • bitwiseXor

      public Item bitwiseXor(Item that)
      Specified by:
      bitwiseXor in class Item
    • bitwiseAnd

      public Item bitwiseAnd(Item that)
      Specified by:
      bitwiseAnd in class Item
    • plus

      public Item plus(Item that)
      Specified by:
      plus in class Item
    • minus

      public Item minus(Item that)
      Specified by:
      minus in class Item
    • times

      public Item times(Item that)
      Specified by:
      times in class Item
    • divide

      public Item divide(Item that)
      Specified by:
      divide in class Item
    • modulo

      public Item modulo(Item that)
      Specified by:
      modulo in class Item
    • not

      public Item not()
      Specified by:
      not in class Item
    • bitwiseNot

      public Item bitwiseNot()
      Specified by:
      bitwiseNot in class Item
    • negative

      public Item negative()
      Specified by:
      negative in class Item
    • positive

      public Item positive()
      Specified by:
      positive in class Item
    • inverse

      public Item inverse()
      Specified by:
      inverse in class Item
    • evaluate

      public Item evaluate(Interpreter interpreter)
      Overrides:
      evaluate in class Item
    • substitute

      public Item substitute(Interpreter interpreter)
      Overrides:
      substitute in class Item
    • isAliased

      public boolean isAliased()
      Specified by:
      isAliased in class Item
    • isMutable

      public boolean isMutable()
      Specified by:
      isMutable in class Item
    • alias

      public void alias()
      Specified by:
      alias in class Item
    • branch

      public Attr branch()
      Specified by:
      branch in class Field
    • commit

      public Attr commit()
      Description copied from class: Item
      Flags this Item as immutable, recursively if it is a Record, then returns this Item.
      Specified by:
      commit in class Field
    • typeOrder

      public int typeOrder()
      Description copied from class: Item
      Returns the heterogeneous sort order of this Item. Used to impose a total order on the set of all items. When comparing two items of different types, the items order according to their typeOrder.
      Specified by:
      typeOrder in class Item
    • compareTo

      public int compareTo(Item other)
      Specified by:
      compareTo in interface Comparable<Item>
      Specified by:
      compareTo in class Item
    • keyEquals

      public boolean keyEquals(Object key)
      Specified by:
      keyEquals in class Item
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in interface Map.Entry<Value,Value>
      Specified by:
      equals in class Item
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface Map.Entry<Value,Value>
      Specified by:
      hashCode in class Item
    • debug

      public <T> Output<T> debug(Output<T> output)
      Description copied from interface: Debug
      Writes a developer readable, debug-formatted string representation of this object to output.
      Specified by:
      debug in interface Debug
      Specified by:
      debug in class Item
      Returns:
      the continuation of the output.
    • of

      public static Attr of(Text key, Value value)
    • of

      public static Attr of(Text key, String value)
    • of

      public static Attr of(Text key, int value)
    • of

      public static Attr of(Text key, long value)
    • of

      public static Attr of(Text key, float value)
    • of

      public static Attr of(Text key, double value)
    • of

      public static Attr of(Text key, boolean value)
    • of

      public static Attr of(String key, Value value)
    • of

      public static Attr of(String key, String value)
    • of

      public static Attr of(String key, int value)
    • of

      public static Attr of(String key, long value)
    • of

      public static Attr of(String key, float value)
    • of

      public static Attr of(String key, double value)
    • of

      public static Attr of(String key, boolean value)
    • of

      public static Attr of(Text key)
    • of

      public static Attr of(String key)