@Test public void testGetTypedValue() { Ip ip = Ip.parse("1.1.1.1"); SelfDescribingObject ipObject = new SelfDescribingObject(Schema.IP, ip); assertThat(ipObject.getTypedValue(), equalTo(ip)); }
@JsonIgnore public Object getTypedValue() { JsonNode jsonNode = BatfishObjectMapper.mapper().valueToTree(_value); return SchemaUtils.convertType(jsonNode, _schema); }
SelfDescribingObject { @JsonIgnore public Object getTypedValue() { JsonNode jsonNode = BatfishObjectMapper.mapper().valueToTree(_value); return SchemaUtils.convertType(jsonNode, _schema); } }
SelfDescribingObject { @JsonIgnore public Object getTypedValue() { JsonNode jsonNode = BatfishObjectMapper.mapper().valueToTree(_value); return SchemaUtils.convertType(jsonNode, _schema); } SelfDescribingObject(Schema schema, @Nullable Object value);  SelfDescribingObject(@Nullable String name, Schema schema, @Nullable Object value); }
SelfDescribingObject { @JsonIgnore public Object getTypedValue() { JsonNode jsonNode = BatfishObjectMapper.mapper().valueToTree(_value); return SchemaUtils.convertType(jsonNode, _schema); } SelfDescribingObject(Schema schema, @Nullable Object value);  SelfDescribingObject(@Nullable String name, Schema schema, @Nullable Object value); @Override boolean equals(Object obj); @Nullable @JsonProperty(PROP_NAME) String getName(); @Nonnull @JsonProperty(PROP_SCHEMA) Schema getSchema(); @Nullable @JsonProperty(PROP_VALUE) Object getValue(); @JsonIgnore Object getTypedValue(); @Override int hashCode(); @Override String toString(); }
SelfDescribingObject { @JsonIgnore public Object getTypedValue() { JsonNode jsonNode = BatfishObjectMapper.mapper().valueToTree(_value); return SchemaUtils.convertType(jsonNode, _schema); } SelfDescribingObject(Schema schema, @Nullable Object value);  SelfDescribingObject(@Nullable String name, Schema schema, @Nullable Object value); @Override boolean equals(Object obj); @Nullable @JsonProperty(PROP_NAME) String getName(); @Nonnull @JsonProperty(PROP_SCHEMA) Schema getSchema(); @Nullable @JsonProperty(PROP_VALUE) Object getValue(); @JsonIgnore Object getTypedValue(); @Override int hashCode(); @Override String toString();  }