Class InternalMapAccessorWithDefaultValue

java.lang.Object
org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
All Implemented Interfaces:
MapAccessor, MapAccessorWithDefaultValue
Direct Known Subclasses:
ValueAdapter

public abstract class InternalMapAccessorWithDefaultValue extends Object implements MapAccessorWithDefaultValue
  • Constructor Details

    • InternalMapAccessorWithDefaultValue

      public InternalMapAccessorWithDefaultValue()
  • Method Details

    • get

      public abstract Value get(String key)
      Description copied from interface: MapAccessor
      Retrieve the value of the property with the given key
      Specified by:
      get in interface MapAccessor
      Parameters:
      key - the key of the property
      Returns:
      the property's value or a NullValue if no such key exists
    • get

      public Value get(String key, Value defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the value with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the value
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the value found by the key or the default value if no such key exists
    • get

      public Object get(String key, Object defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the object with the given key. If no object found by the key, then the default object provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the object
      defaultValue - the default object that would be returned if no object found by the key in the map
      Returns:
      the object found by the key or the default object if no such key exists
    • get

      public Number get(String key, Number defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the number with the given key. If no number found by the key, then the default number provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the number
      defaultValue - the default number that would be returned if no number found by the key in the map
      Returns:
      the number found by the key or the default number if no such key exists
    • get

      public Entity get(String key, Entity defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the entity with the given key. If no entity found by the key, then the default entity provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the entity
      defaultValue - the default entity that would be returned if no entity found by the key in the map
      Returns:
      the entity found by the key or the default entity if no such key exists
    • get

      public Node get(String key, Node defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the node with the given key. If no node found by the key, then the default node provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the node
      defaultValue - the default node that would be returned if no node found by the key in the map
      Returns:
      the node found by the key or the default node if no such key exists
    • get

      public Path get(String key, Path defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the path with the given key. If no path found by the key, then the default path provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default path that would be returned if no path found by the key in the map
      Returns:
      the path found by the key or the default path if no such key exists
    • get

      public Relationship get(String key, Relationship defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the value with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the value found by the key or the default value if no such key exists
    • get

      public List<Object> get(String key, List<Object> defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the list of objects with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the value
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the list of objects found by the key or the default value if no such key exists
    • get

      public <T> List<T> get(String key, List<T> defaultValue, Function<Value,T> mapFunc)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the list with the given key. If no value found by the key, then the default list provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Type Parameters:
      T - the type of the elements in the returned list
      Parameters:
      key - the key of the value
      defaultValue - the default value that would be returned if no value found by the key in the map
      mapFunc - the map function that defines how to map each element of the list from Value to T
      Returns:
      the converted list found by the key or the default list if no such key exists
    • get

      public Map<String,Object> get(String key, Map<String,Object> defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the map with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the map found by the key or the default value if no such key exists
    • get

      public <T> Map<String,T> get(String key, Map<String,T> defaultValue, Function<Value,T> mapFunc)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the map with the given key. If no value found by the key, then the default map provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Type Parameters:
      T - the type of the values in the returned map
      Parameters:
      key - the key of the value
      defaultValue - the default value that would be returned if no value found by the key in the map
      mapFunc - the map function that defines how to map each value in map from Value to T
      Returns:
      the converted map found by the key or the default map if no such key exists.
    • get

      public int get(String key, int defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java integer with the given key. If no integer found by the key, then the default integer provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default integer that would be returned if no integer found by the key in the map
      Returns:
      the integer found by the key or the default integer if no such key exists
    • get

      public long get(String key, long defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java long number with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the java long number found by the key or the default value if no such key exists
    • get

      public boolean get(String key, boolean defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java boolean with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the java boolean found by the key or the default value if no such key exists
    • get

      public String get(String key, String defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java string with the given key. If no string found by the key, then the default string provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default string that would be returned if no string found by the key in the map
      Returns:
      the string found by the key or the default string if no such key exists
    • get

      public float get(String key, float defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java float number with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the java float number found by the key or the default value if no such key exists
    • get

      public double get(String key, double defaultValue)
      Description copied from interface: MapAccessorWithDefaultValue
      Retrieve the java double number with the given key. If no value found by the key, then the default value provided would be returned.
      Specified by:
      get in interface MapAccessorWithDefaultValue
      Parameters:
      key - the key of the property
      defaultValue - the default value that would be returned if no value found by the key in the map
      Returns:
      the java double number found by the key or the default value if no such key exists