@Override public <V> VertexProperty<V> property(final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(cardinality, key, value, keyValues)); }
@Override public <V> Iterator<VertexProperty<V>> properties(final String... propertyKeys) { return IteratorUtils.map(super.properties(propertyKeys), property -> new ComputerVertexProperty<V>((VertexProperty<V>) property)); }
@Override public Vertex element() { return new ComputerVertex(this.getBaseVertexProperty().element()); }
@Override public Element element() { final Element element = this.property.element(); if (element instanceof Vertex) return new ComputerVertex((Vertex) element); else if (element instanceof Edge) return new ComputerEdge((Edge) element); else return new ComputerVertexProperty((VertexProperty) element); }
@Override public <V> VertexProperty<V> property(final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value, keyValues)); }
@Override public V value() throws NoSuchElementException { return this.<V>getBaseVertexProperty().value(); }
@Override public <V> VertexProperty<V> property(final String key) { return new ComputerVertexProperty<>(this.getBaseVertex().property(key)); }
@Override public boolean isPresent() { return this.getBaseVertexProperty().isPresent(); }
@Override public String key() { return this.getBaseVertexProperty().key(); }
@Override public <V> VertexProperty<V> property(final VertexProperty.Cardinality cardinality, final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(cardinality, key, value, keyValues)); }
@Override public <V> VertexProperty<V> property(final String key, final V value) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value)); }
@Override public VertexProperty<V> getBaseVertexProperty() { return (VertexProperty<V>) this.getBaseElement(); } }
@Override public Vertex element() { return new ComputerVertex(this.getBaseVertexProperty().element()); }
@Override public V value() throws NoSuchElementException { return this.<V>getBaseVertexProperty().value(); }
@Override public Element element() { final Element element = this.property.element(); if (element instanceof Vertex) return new ComputerVertex((Vertex) element); else if (element instanceof Edge) return new ComputerEdge((Edge) element); else return new ComputerVertexProperty((VertexProperty) element); }
@Override public <V> Iterator<VertexProperty<V>> properties(final String... propertyKeys) { return IteratorUtils.map(super.properties(propertyKeys), property -> new ComputerVertexProperty<V>((VertexProperty<V>) property)); }
@Override public <V> VertexProperty<V> property(final String key) { return new ComputerVertexProperty<>(this.getBaseVertex().property(key)); }
@Override public String key() { return this.getBaseVertexProperty().key(); }
@Override public boolean isPresent() { return this.getBaseVertexProperty().isPresent(); }
@Override public <V> VertexProperty<V> property(final String key, final V value, final Object... keyValues) { if (state.equals(State.MAP_REDUCE)) throw GraphComputer.Exceptions.vertexPropertiesCanNotBeUpdatedInMapReduce(); if (!computeKeys.contains(key)) throw GraphComputer.Exceptions.providedKeyIsNotAnElementComputeKey(key); return new ComputerVertexProperty<>(this.getBaseVertex().property(key, value, keyValues)); }