VertexProperties { public static Stream<?> streamValue(VertexProperty<?> vp) { Object value = vp.orElse(null); if (value == null) { return Stream.empty(); } else if (value instanceof List<?>) { return ((List<?>) value).stream(); } else if (value.getClass().isArray()) { return Stream.of((Object[]) value); } else { return Stream.of(value); } } private  VertexProperties(); static Stream<?> streamValue(VertexProperty<?> vp); static Optional<T> optionalValue(VertexProperty<T> vp); static Optional<String> stringValue(Vertex v, Object propertyKey); static Optional<Object> objectValue(Vertex v, Object propertyKey); static Optional<T> objectValue(Vertex v, Object propertyKey, Class<T> type); static Comparator<VertexProperty<T>> presentFirst(Comparator<T> comparator); static Comparator<VertexProperty<T>> presentLast(Comparator<T> comparator);  }
@Test public void streamVertexPropertyStringArray() { VertexProperty<String[]> vp = StarGraph.open().addVertex("test").property("test", new String[] { "foo", "bar" }); assertThat(VertexProperties.streamValue(vp)).containsExactly("foo", "bar"); }