All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.gremlin.giraph.structure.GiraphProperty Maven / Gradle / Ivy

package com.tinkerpop.gremlin.giraph.structure;

import com.tinkerpop.gremlin.structure.Element;
import com.tinkerpop.gremlin.structure.Property;
import com.tinkerpop.gremlin.structure.util.ElementHelper;
import com.tinkerpop.gremlin.structure.util.wrapped.WrappedProperty;
import com.tinkerpop.gremlin.tinkergraph.structure.TinkerProperty;

import java.io.Serializable;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class GiraphProperty implements Property, WrappedProperty>, Serializable {

    private final TinkerProperty tinkerProperty;
    private final Element giraphElement;

    protected GiraphProperty(final TinkerProperty tinkerProperty, final Element giraphElement) {
        this.tinkerProperty = tinkerProperty;
        this.giraphElement = giraphElement;
    }

    @Override
    public boolean isPresent() {
        return this.tinkerProperty.isPresent();
    }

    @Override
    public V value() {
        return this.tinkerProperty.value();
    }

    @Override
    public boolean isHidden() {
        return this.tinkerProperty.isHidden();
    }

    @Override
    public TinkerProperty getBaseProperty() {
        return this.tinkerProperty;
    }

    @Override
    public String key() {
        return this.tinkerProperty.key();
    }

    @Override
    public void remove() {
        this.tinkerProperty.remove();
    }

    @Override
    public  E getElement() {
        return (E) this.giraphElement;
    }

    @Override
    public boolean equals(final Object object) {
        return ElementHelper.areEqual(this, object);
    }

    @Override
    public int hashCode() {
        return this.tinkerProperty.hashCode();
    }

    @Override
    public String toString() {
        return this.tinkerProperty.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy