com.fasterxml.jackson.module.jsonSchema.JsonSchema.equals()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中com.fasterxml.jackson.module.jsonSchema.JsonSchema.equals()方法的一些代码示例,展示了JsonSchema.equals()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonSchema.equals()方法的具体详情如下:
包路径:com.fasterxml.jackson.module.jsonSchema.JsonSchema
类名称:JsonSchema
方法名:equals

JsonSchema.equals介绍

[英]A utility method allowing to easily chain calls to equals() on members without taking any risk regarding the ternary operator precedence.
[中]一种实用方法,允许在成员上轻松链接对equals()的调用,而不必冒任何三元运算符优先级的风险。

代码示例

代码示例来源:origin: com.fasterxml.jackson.module/jackson-module-jsonSchema

protected static <T> boolean arraysEqual(T[] arr1, T[] arr2) {
     if (arr1 == null) {
       return arr2 == null;
     }
     if (arr2 == null) {
       return false;
     }
     int len = arr1.length;
     if (len != arr2.length) {
       return false;
     }
     for (int i = 0; i < len; ++i) {
       T ob1 = arr1[i];
       T ob2 = arr2[i];

       if (!equals(ob1, ob2)) {
         return false;
       }
     }
     return true;
   }
}

代码示例来源:origin: FasterXML/jackson-module-jsonSchema

protected static <T> boolean arraysEqual(T[] arr1, T[] arr2) {
     if (arr1 == null) {
       return arr2 == null;
     }
     if (arr2 == null) {
       return false;
     }
     int len = arr1.length;
     if (len != arr2.length) {
       return false;
     }
     for (int i = 0; i < len; ++i) {
       T ob1 = arr1[i];
       T ob2 = arr2[i];

       if (!equals(ob1, ob2)) {
         return false;
       }
     }
     return true;
   }
}

代码示例来源:origin: org.graylog2/graylog2-server

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (o instanceof RotationStrategyDescription) {
  RotationStrategyDescription that = (RotationStrategyDescription) o;
  return (this.type.equals(that.type()))
     && (this.defaultConfig.equals(that.defaultConfig()))
     && (this.jsonSchema.equals(that.jsonSchema()));
 }
 return false;
}

代码示例来源:origin: org.graylog2/graylog2-server

@Override
public boolean equals(Object o) {
 if (o == this) {
  return true;
 }
 if (o instanceof RetentionStrategyDescription) {
  RetentionStrategyDescription that = (RetentionStrategyDescription) o;
  return (this.type.equals(that.type()))
     && (this.defaultConfig.equals(that.defaultConfig()))
     && (this.jsonSchema.equals(that.jsonSchema()));
 }
 return false;
}

代码示例来源:origin: com.fasterxml.jackson.module/jackson-module-jsonSchema

protected boolean _equals(JsonSchema that)
  {
    return equals(getId(), getId())
        // 27-Apr-2015, tatu: Should not need to check type explicitly
//                 && equals(getType(), getType())
        && equals(getRequired(), that.getRequired())
        && equals(getReadonly(), that.getReadonly())
        && equals(get$ref(), that.get$ref())
        && equals(get$schema(), that.get$schema())
        && arraysEqual(getDisallow(), that.getDisallow())
        && arraysEqual(getExtends(), that.getExtends());
  }

代码示例来源:origin: FasterXML/jackson-module-jsonSchema

protected boolean _equals(JsonSchema that)
  {
    return equals(getId(), getId())
        // 27-Apr-2015, tatu: Should not need to check type explicitly
//                 && equals(getType(), getType())
        && equals(getRequired(), that.getRequired())
        && equals(getReadonly(), that.getReadonly())
        && equals(get$ref(), that.get$ref())
        && equals(get$schema(), that.get$schema())
        && arraysEqual(getDisallow(), that.getDisallow())
        && arraysEqual(getExtends(), that.getExtends());
  }

相关文章