Class MapTermImpl

java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.MapTermImpl
All Implemented Interfaces:
MapTerm, Term, ToDOM, ToJson, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>

public class MapTermImpl
extends DefaultTerm
implements MapTerm
Represents a Jason map as a TreeMap in java
Author:
Jomi
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • MapTermImpl

      public MapTermImpl()
  • Method Details

    • clone

      public MapTerm clone()
      Specified by:
      clone in interface Term
      Specified by:
      clone in class DefaultTerm
    • deepClone

      public MapTerm deepClone()
      Specified by:
      deepClone in interface MapTerm
    • capply

      public MapTerm capply​(Unifier u)
      Description copied from interface: Term
      clone and applies together (and faster than clone and then apply)
      Specified by:
      capply in interface Term
      Overrides:
      capply in class DefaultTerm
    • equals

      public boolean equals​(java.lang.Object t)
      Specified by:
      equals in interface Term
      Overrides:
      equals in class java.lang.Object
    • calcHashCode

      public int calcHashCode()
      Specified by:
      calcHashCode in class DefaultTerm
    • compareTo

      public int compareTo​(Term o)
      Specified by:
      compareTo in interface java.lang.Comparable<Term>
      Overrides:
      compareTo in class DefaultTerm
    • size

      public int size()
      Specified by:
      size in interface MapTerm
    • isMap

      public boolean isMap()
      Specified by:
      isMap in interface Term
      Overrides:
      isMap in class DefaultTerm
    • get

      public Term get​(Term k)
      Specified by:
      get in interface MapTerm
    • put

      public void put​(Term k, Term v)
      Specified by:
      put in interface MapTerm
    • remove

      public Term remove​(Term k)
      Specified by:
      remove in interface MapTerm
    • keys

      public java.util.Set<Term> keys()
      Specified by:
      keys in interface MapTerm
    • values

      public java.util.Collection<Term> values()
      Specified by:
      values in interface MapTerm
    • clear

      public void clear()
      Specified by:
      clear in interface MapTerm
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • getAsDOM

      public org.w3c.dom.Element getAsDOM​(org.w3c.dom.Document document)
      Specified by:
      getAsDOM in interface ToDOM
    • getAsJson

      public javax.json.JsonValue getAsJson()
      Specified by:
      getAsJson in interface ToJson