@Test public void get() { assertThat(Row.builder().put("col", 42).build().get("col", Schema.INTEGER), equalTo(42)); assertThat( Row.builder().put("col", new Node("node")).build().get("col", Schema.NODE), equalTo(new Node("node"))); assertThat( Row.builder() .put("col", ImmutableList.of(4, 2)) .build() .get("col", Schema.list(Schema.INTEGER)), equalTo(ImmutableList.of(4, 2))); assertThat( Row.builder() .put("col", ImmutableList.of(new Node("n1"), new Node("n2"))) .build() .get("col", Schema.list(Schema.NODE)), equalTo(ImmutableList.of(new Node("n1"), new Node("n2")))); }
public JsonNode get(String columnName) { if (!_data.has(columnName)) { throw new NoSuchElementException(missingColumnErrorMessage(columnName, getColumnNames())); } return _data.get(columnName); }
Row implements Comparable<Row>, Serializable { public JsonNode get(String columnName) { if (!_data.has(columnName)) { throw new NoSuchElementException(missingColumnErrorMessage(columnName, getColumnNames())); } return _data.get(columnName); } }
Row implements Comparable<Row>, Serializable { public JsonNode get(String columnName) { if (!_data.has(columnName)) { throw new NoSuchElementException(missingColumnErrorMessage(columnName, getColumnNames())); } return _data.get(columnName); } @JsonCreator private  Row(ObjectNode data); }
Row implements Comparable<Row>, Serializable { public JsonNode get(String columnName) { if (!_data.has(columnName)) { throw new NoSuchElementException(missingColumnErrorMessage(columnName, getColumnNames())); } return _data.get(columnName); } @JsonCreator private  Row(ObjectNode data); static Row of(Object... objects); static Row of(Map<String, ColumnMetadata> columns, Object... objects); static UntypedRowBuilder builder(); static TypedRowBuilder builder(Map<String, ColumnMetadata> columns); @Override int compareTo(Row o); @Override boolean equals(Object o); JsonNode get(String columnName); Object get(String columnName, Schema columnSchema); T get(String columnName, TypeReference<T> typeReference); Boolean getBoolean(String column); Set<String> getColumnNames(); Double getDouble(String column); FileLines getFileLines(String column); Flow getFlow(String column); Integer getInteger(String column); List<Object> getKey(List<ColumnMetadata> metadata); NodeInterfacePair getInterface(String column); Ip getIp(String column); Issue getIssue(String column); @Nullable Long getLong(String column); Node getNode(String column); Object getObject(String column); Prefix getPrefix(String column); SelfDescribingObject getSelfDescribing(String column); String getString(String column); @Nullable Trace getTrace(String column); List<Object> getValue(List<ColumnMetadata> metadata); @Override int hashCode(); boolean isCovered(ObjectNode exclusion); static String missingColumnErrorMessage(String columnName, Set<String> columns); @Override String toString(); boolean hasNonNull(String column); }
Row implements Comparable<Row>, Serializable { public JsonNode get(String columnName) { if (!_data.has(columnName)) { throw new NoSuchElementException(missingColumnErrorMessage(columnName, getColumnNames())); } return _data.get(columnName); } @JsonCreator private  Row(ObjectNode data); static Row of(Object... objects); static Row of(Map<String, ColumnMetadata> columns, Object... objects); static UntypedRowBuilder builder(); static TypedRowBuilder builder(Map<String, ColumnMetadata> columns); @Override int compareTo(Row o); @Override boolean equals(Object o); JsonNode get(String columnName); Object get(String columnName, Schema columnSchema); T get(String columnName, TypeReference<T> typeReference); Boolean getBoolean(String column); Set<String> getColumnNames(); Double getDouble(String column); FileLines getFileLines(String column); Flow getFlow(String column); Integer getInteger(String column); List<Object> getKey(List<ColumnMetadata> metadata); NodeInterfacePair getInterface(String column); Ip getIp(String column); Issue getIssue(String column); @Nullable Long getLong(String column); Node getNode(String column); Object getObject(String column); Prefix getPrefix(String column); SelfDescribingObject getSelfDescribing(String column); String getString(String column); @Nullable Trace getTrace(String column); List<Object> getValue(List<ColumnMetadata> metadata); @Override int hashCode(); boolean isCovered(ObjectNode exclusion); static String missingColumnErrorMessage(String columnName, Set<String> columns); @Override String toString(); boolean hasNonNull(String column);  }