当前位置: 首页>>代码示例>>Java>>正文


Java Objects.deepEquals方法代码示例

本文整理汇总了Java中java.util.Objects.deepEquals方法的典型用法代码示例。如果您正苦于以下问题:Java Objects.deepEquals方法的具体用法?Java Objects.deepEquals怎么用?Java Objects.deepEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.Objects的用法示例。


在下文中一共展示了Objects.deepEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: innerEquals

import java.util.Objects; //导入方法依赖的package包/类
@Override
protected boolean innerEquals(Object obj) {
    PercentileRanksAggregationBuilder other = (PercentileRanksAggregationBuilder) obj;
    if (!Objects.equals(method, other.method)) {
        return false;
    }
    boolean equalSettings = false;
    switch (method) {
    case HDR:
        equalSettings = Objects.equals(numberOfSignificantValueDigits, other.numberOfSignificantValueDigits);
        break;
    case TDIGEST:
        equalSettings = Objects.equals(compression, other.compression);
        break;
    default:
        throw new IllegalStateException("Illegal method [" + method + "]");
    }
    return equalSettings
            && Objects.deepEquals(values, other.values)
            && Objects.equals(keyed, other.keyed)
            && Objects.equals(method, other.method);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:23,代码来源:PercentileRanksAggregationBuilder.java

示例2: equals

import java.util.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    @SuppressWarnings("unchecked")
    AbstractPipelineAggregationBuilder<PAB> other = (AbstractPipelineAggregationBuilder<PAB>) obj;
    if (!Objects.equals(name, other.name))
        return false;
    if (!Objects.equals(type, other.type))
        return false;
    if (!Objects.deepEquals(bucketsPaths, other.bucketsPaths))
        return false;
    if (!Objects.equals(metaData, other.metaData))
        return false;
    return doEquals(obj);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:AbstractPipelineAggregationBuilder.java

示例3: ImageORTable

import java.util.Objects; //导入方法依赖的package包/类
public ImageORTable(ImageORPanel imageOR) {
    this.imageOR = imageOR;
    table = new XTable();
    toolBar = new Toolbar();
    cardLayout = new CardLayout();
    cardPanel = new JPanel(cardLayout);
    imagePanel = new ImagePanel();
    propertyEditor = new PropertyEditor() {
        @Override
        public void onClose(ImageORObject object) {
            if (Objects.deepEquals(getObject(), object)) {
                loadObject(object);
                table.repaint();
            }
        }
    };
    init();
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:19,代码来源:ImageORTable.java

示例4: test1

import java.util.Objects; //导入方法依赖的package包/类
private static void test1() throws Exception {
    byte[] src = new byte[] {
        46, -97, -35, -44, 127, -60, -39, -4, -112, 34, -57, 47, -14, 67,
        40, 18, 90, -59, 68, 112, 23, 121, -91, 94, 35, 49, 104, 17, 30,
        -80, -104, -3, -53, 27, 38, -72, -47, 113, -52, 18, 5, -126 };
    Encoder encoder = Base64.getMimeEncoder(49, new byte[] { 0x7e });
    byte[] encoded = encoder.encode(src);
    Decoder decoder = Base64.getMimeDecoder();
    byte[] decoded = decoder.decode(encoded);
    if (!Objects.deepEquals(src, decoded)) {
        throw new RuntimeException();
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:14,代码来源:TestBase64Golden.java

示例5: assertDeepEquals

import java.util.Objects; //导入方法依赖的package包/类
private static void assertDeepEquals(Object expected, Object received, String msg) {
    if (!Objects.deepEquals(expected, received)) {
        throw new TestAssertException("Unexpected result for " + msg
                + ".\n\texpected: " + deepToString(expected)
                +  "\n\tactual:   " + deepToString(received));
    } else {
        System.out.println("Got expected " + msg + ": " + deepToString(received));
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:SimpleUpdateConfigurationTest.java

示例6: compareRepeating

import java.util.Objects; //导入方法依赖的package包/类
private boolean compareRepeating(LogRecord r1, LogRecord r2) {
    return r1.getLevel().equals(r2.getLevel()) &&
           Objects.equals(r1.getLoggerName(), r2.getLoggerName()) &&
           Objects.equals(r1.getMessage(), r2.getMessage()) &&
           Objects.deepEquals(r1.getParameters(), r2.getParameters()) &&
           Objects.equals(r1.getResourceBundle(), r2.getResourceBundle()) &&
           Objects.equals(r1.getResourceBundleName(), r2.getResourceBundleName()) &&
           Objects.equals(r1.getSourceClassName(), r2.getSourceClassName()) &&
           Objects.equals(r1.getSourceMethodName(), r2.getSourceMethodName()) &&
           //r1.getThreadID() == r2.getThreadID() &&
           compareThrown(r1.getThrown(), r2.getThrown());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:MessagesHandler.java

示例7: equals

import java.util.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (obj == null || obj.getClass() != ActionHandler.class) {
        return false;
    }
    ActionHandler<?, ?> other = (ActionHandler<?, ?>) obj;
    return Objects.equals(action, other.action)
            && Objects.equals(transportAction, other.transportAction)
            && Objects.deepEquals(supportTransportActions, other.supportTransportActions);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:ActionPlugin.java

示例8: hasScmRange

import java.util.Objects; //导入方法依赖的package包/类
public ConfigurationAssert hasScmRange(Range range) {
    isNotNull();

    if(Objects.deepEquals(actual.getScm().getRange(), range)) {
        failWithMessage("Expected SCM range to be <%s> but was <%s>", range, actual.getScm().getRange());
    }
    return this;
}
 
开发者ID:arquillian,项目名称:smart-testing,代码行数:9,代码来源:ConfigurationAssert.java

示例9: isLoggedIn

import java.util.Objects; //导入方法依赖的package包/类
public boolean isLoggedIn() {
    try {
        JSONObject res = httpClient.Get(this.getUrl(buildUrl(IS_LOGGED_IN)));
        return res != null && Objects.deepEquals(200, res.get("status"))
                && Objects.toString(res.get("res"), "").contains(usr);
    } catch (Exception ex) {
        LOG.log(Level.SEVERE, null, ex);
    }
    return false;
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:11,代码来源:QCRestClient.java

示例10: assertEqual

import java.util.Objects; //导入方法依赖的package包/类
private static void assertEqual(Object result, Object expect) {
    if (!Objects.deepEquals(result, expect)) {
        String resultStr = result.toString();
        String expectStr = expect.toString();
        if (result instanceof byte[]) {
            resultStr = new String((byte[]) result, DEF_CHARSET);
        }
        if (expect instanceof byte[]) {
            expectStr = new String((byte[]) expect, DEF_CHARSET);
        }
        throw new RuntimeException(DEF_EXCEPTION_MSG +
            " result: " + resultStr + " expected: " + expectStr);
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:15,代码来源:TestBase64Golden.java

示例11: equals

import java.util.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Data<?> data = (Data<?>) o;
    return revision == data.revision &&
            Objects.deepEquals(value, data.value) &&
            Objects.equals(type, data.type);
}
 
开发者ID:flux-capacitor-io,项目名称:flux-capacitor-client,代码行数:14,代码来源:Data.java

示例12: equals

import java.util.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
    return obj instanceof LogEvent
            && Objects.deepEquals(this.toArray(), ((LogEvent)obj).toArray());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:TestLoggerFinder.java

示例13: innerEquals

import java.util.Objects; //导入方法依赖的package包/类
@Override
protected boolean innerEquals(BucketMetricsPipelineAggregationBuilder<PercentilesBucketPipelineAggregationBuilder> obj) {
    PercentilesBucketPipelineAggregationBuilder other = (PercentilesBucketPipelineAggregationBuilder) obj;
    return Objects.deepEquals(percents, other.percents);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:6,代码来源:PercentilesBucketPipelineAggregationBuilder.java

示例14: cmp

import java.util.Objects; //导入方法依赖的package包/类
public static boolean cmp(Value value, Value o) {
    return Objects.deepEquals(value.asObj(), o.asObj());
}
 
开发者ID:rsksmart,项目名称:rskj,代码行数:4,代码来源:ValueTest.java

示例15: isDuplicate

import java.util.Objects; //导入方法依赖的package包/类
public Boolean isDuplicate(ExecutionStep step) {
    return Objects.deepEquals(step.exeStepDetails, exeStepDetails);
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:4,代码来源:ExecutionStep.java


注:本文中的java.util.Objects.deepEquals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。