Class ExecutionPropertyMap<T extends ExecutionProperty>

  • Type Parameters:
    T - Type of ExecutionProperty this map stores.
    All Implemented Interfaces:
    java.io.Serializable

    @NotThreadSafe
    public final class ExecutionPropertyMap<T extends ExecutionProperty>
    extends java.lang.Object
    implements java.io.Serializable
    ExecutionPropertyMap Class, which uses HashMap for keeping track of ExecutionProperties for vertices and edges.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecutionPropertyMap​(java.lang.String id)
      Constructor for ExecutionPropertyMap class.
    • Constructor Detail

      • ExecutionPropertyMap

        public ExecutionPropertyMap​(java.lang.String id)
        Constructor for ExecutionPropertyMap class.
        Parameters:
        id - ID of the vertex / edge to keep the execution property of.
    • Method Detail

      • getId

        public java.lang.String getId()
        ID of the item this ExecutionPropertyMap class is keeping track of.
        Returns:
        the ID of the item this ExecutionPropertyMap class is keeping track of.
      • put

        public T put​(T executionProperty)
        Put the given execution property in the ExecutionPropertyMap. By default, it does not finalize the property.
        Parameters:
        executionProperty - execution property to insert.
        Returns:
        the previous execution property, or null if there was no execution property with the specified property key.
      • put

        public T put​(T executionProperty,
                     java.lang.Boolean finalize)
        Put the given execution property in the ExecutionPropertyMap.
        Parameters:
        executionProperty - execution property to insert.
        finalize - whether or not to finalize the execution property.
        Returns:
        the previous execution property, or null if there was no execution property with the specified property key.
      • get

        public <U extends java.io.Serializable> java.util.Optional<U> get​(java.lang.Class<? extends ExecutionProperty<U>> executionPropertyKey)
        Get the value of the given execution property type.
        Type Parameters:
        U - Type of the return value.
        Parameters:
        executionPropertyKey - the execution property type to find the value of.
        Returns:
        the value of the given execution property.
      • remove

        public T remove​(java.lang.Class<? extends T> key)
        remove the execution property.
        Parameters:
        key - key of the execution property to remove.
        Returns:
        the removed execution property
      • containsKey

        public boolean containsKey​(java.lang.Class<? extends T> key)
        Parameters:
        key - key to look for.
        Returns:
        whether or not the execution property map contains the key.
      • forEachProperties

        public void forEachProperties​(java.util.function.Consumer<? super T> action)
        Same as forEach function in Java 8, but for execution properties.
        Parameters:
        action - action to apply to each of the execution properties.
      • stream

        public java.util.stream.Stream<T> stream()
        Returns:
        Stream of execution properties.
      • toString

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

        public com.fasterxml.jackson.databind.node.ObjectNode asJsonNode()
        Returns:
        JsonNode for this execution property map.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object