@Test public void testGetProperty() { assertThat(GraphUtil.getProperty(node, "foo", String.class), is(Optional.of("bar"))); assertThat(GraphUtil.getProperty(node, "fizz", Integer.class), is(Optional.of(1))); }
static public <T> Optional<T> getProperty(PropertyContainer container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.hasProperty(property)) { value = Optional.<T> of(type.cast(container.getProperty(property))); } return value; }
GraphUtil { static public <T> Optional<T> getProperty(PropertyContainer container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.hasProperty(property)) { value = Optional.<T> of(type.cast(container.getProperty(property))); } return value; } }
GraphUtil { static public <T> Optional<T> getProperty(PropertyContainer container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.hasProperty(property)) { value = Optional.<T> of(type.cast(container.getProperty(property))); } return value; }  }
GraphUtil { static public <T> Optional<T> getProperty(PropertyContainer container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.hasProperty(property)) { value = Optional.<T> of(type.cast(container.getProperty(property))); } return value; }  static void addProperty(PropertyContainer container, String property, Object value); static Optional<T> getProperty(PropertyContainer container, String property,
      Class<T> type); static Collection<T> getProperties(PropertyContainer container, String property,
      Class<T> type); static Iterable<Relationship> getRelationships(final Node a, final Node b,
      RelationshipType type, final boolean directed); static Iterable<Relationship> getRelationships(final Node a, final Node b,
      RelationshipType type); static boolean ignoreProperty(Object value); }
GraphUtil { static public <T> Optional<T> getProperty(PropertyContainer container, String property, Class<T> type) { Optional<T> value = Optional.<T>empty(); if (container.hasProperty(property)) { value = Optional.<T> of(type.cast(container.getProperty(property))); } return value; }  static void addProperty(PropertyContainer container, String property, Object value); static Optional<T> getProperty(PropertyContainer container, String property,
      Class<T> type); static Collection<T> getProperties(PropertyContainer container, String property,
      Class<T> type); static Iterable<Relationship> getRelationships(final Node a, final Node b,
      RelationshipType type, final boolean directed); static Iterable<Relationship> getRelationships(final Node a, final Node b,
      RelationshipType type); static boolean ignoreProperty(Object value);  }