本文整理了Java中com.fasterxml.jackson.databind.node.ObjectNode.equals()
方法的一些代码示例,展示了ObjectNode.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectNode.equals()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.node.ObjectNode
类名称:ObjectNode
方法名:equals
暂无
代码示例来源:origin: redisson/redisson
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: embulk/embulk
@Override
public boolean equals(Object other) {
if (!(other instanceof DataSource)) {
return false;
}
return data.equals(((DataSource) other).getObjectNode());
}
代码示例来源:origin: swagger-api/swagger-core
private static void apply(Object objectToSerialize, String str, ObjectMapper mapper) {
final ObjectNode lhs = mapper.convertValue(objectToSerialize, ObjectNode.class);
ObjectNode rhs = null;
try {
rhs = mapper.readValue(str, ObjectNode.class);
} catch (IOException e) {
LOGGER.error("Failed to read value", e);
}
if (!lhs.equals(new ObjectNodeComparator(), rhs)) {
assertEquals(Yaml.pretty(lhs), Yaml.pretty(rhs));
//fail(String.format("Serialized object:\n%s\ndoes not equal to expected serialized string:\n%s", lhs, rhs));
}
}
代码示例来源:origin: batfish/batfish
@Override
public boolean equals(Object o) {
if (!(o instanceof Row)) {
return false;
}
return _data.equals(((Row) o)._data);
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: Nextdoor/bender
@Override
public boolean equals(Object o)
{
if (o == this) return true;
if (o == null) return false;
if (!(o instanceof JsonSchema)) return false;
JsonSchema other = (JsonSchema) o;
if (schema == null) {
return other.schema == null;
}
return schema.equals(other.schema);
}
代码示例来源:origin: com.sonymobile/lumbermill-core
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
JsonEvent jsonEvent = (JsonEvent) o;
return jsonNode != null ? jsonNode.equals(jsonEvent.jsonNode) : jsonEvent.jsonNode == null;
}
代码示例来源:origin: com.unboundid.product.scim2/scim2-sdk-common
!extensionObjectNode.equals(that.extensionObjectNode) :
that.extensionObjectNode != null)
代码示例来源:origin: pingidentity/scim2
!extensionObjectNode.equals(that.extensionObjectNode) :
that.extensionObjectNode != null)
代码示例来源:origin: pingidentity/scim2
callbackParameters.equals(that.callbackParameters) :
that.callbackParameters == null;
代码示例来源:origin: Qihoo360/Quicksql
/** Returns a function that checks that a particular Elasticsearch pipeline is
* generated to implement a query.
* @param strings expected expressions
* @return validation function
*/
public static Consumer<List> elasticsearchChecker(final String... strings) {
Objects.requireNonNull(strings, "strings");
return a -> {
ObjectNode actual = a == null || a.isEmpty() ? null
: ((ObjectNode) a.get(0));
actual = expandDots(actual);
try {
String json = "{" + Arrays.stream(strings).collect(Collectors.joining(",")) + "}";
ObjectNode expected = (ObjectNode) MAPPER.readTree(json);
expected = expandDots(expected);
if (!expected.equals(actual)) {
assertEquals("expected and actual Elasticsearch queries do not match",
MAPPER.writeValueAsString(expected),
MAPPER.writeValueAsString(actual));
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
};
}
代码示例来源:origin: marklogic/java-client-api
expectedNode.equals(readNode));
代码示例来源:origin: marklogic/java-client-api
expectedNode.equals(readNode));
代码示例来源:origin: marklogic/java-client-api
JsonNode readNode = mapper.readTree(docText);
assertTrue("Failed to read JSON document as String",
sourceNode.equals(readNode));
readNode = mapper.readTree(bytesHandle.get());
assertTrue("JSON document mismatch reading bytes",
sourceNode.equals(readNode));
readNode = mapper.readTree(inputStreamHandle.get());
assertTrue("JSON document mismatch reading input stream",
sourceNode.equals(readNode));
sourceNode.equals(readNode));
sourceNode.equals(readNode));
内容来源于网络,如有侵权,请联系作者删除!