Class TinkerProperty<V>

  • All Implemented Interfaces:
    Property<V>

    public final class TinkerProperty<V>
    extends Object
    implements Property<V>
    Author:
    Marko A. Rodriguez (http://markorodriguez.com)
    • Field Detail

      • element

        protected final Element element
      • key

        protected final String key
      • value

        protected V value
    • Constructor Detail

      • TinkerProperty

        public TinkerProperty​(Element element,
                              String key,
                              V value)
    • Method Detail

      • element

        public Element element()
        Description copied from interface: Property
        Get the element that this property is associated with.
        Specified by:
        element in interface Property<V>
        Returns:
        The element associated with this property (i.e. Vertex, Edge, or VertexProperty).
      • key

        public String key()
        Description copied from interface: Property
        The key of the property.
        Specified by:
        key in interface Property<V>
        Returns:
        The property key
      • value

        public V value()
        Description copied from interface: Property
        The value of the property.
        Specified by:
        value in interface Property<V>
        Returns:
        The property value
      • isPresent

        public boolean isPresent()
        The existence of this object implies the property is present, thus even a null value means "present".
        Specified by:
        isPresent in interface Property<V>
        Returns:
        True if the property exists, else false
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • remove

        public void remove()
        Description copied from interface: Property
        Remove the property from the associated element.
        Specified by:
        remove in interface Property<V>