Class MapBuilder

java.lang.Object
org.basex.query.value.map.MapBuilder

public final class MapBuilder extends Object
A convenience class for building new maps.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • MapBuilder

      public MapBuilder()
  • Method Details

    • put

      public void put(Item key, Value value) throws QueryException
      Adds a key/value pair to the map.
      Parameters:
      key - key
      value - value
      Throws:
      QueryException - query exception
    • put

      public void put(String key, Value value) throws QueryException
      Adds a key string and a value to the map.
      Parameters:
      key - key
      value - value
      Throws:
      QueryException - query exception
    • put

      public void put(String key, String value) throws QueryException
      Adds key/value strings to the map.
      Parameters:
      key - key
      value - value (can be null)
      Throws:
      QueryException - query exception
    • finish

      public XQMap finish()
      Returns the resulting map and invalidates the internal reference.
      Returns:
      map