本文整理汇总了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);
}
示例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);
}
示例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();
}
示例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();
}
}
示例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));
}
}
示例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());
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例12: equals
import java.util.Objects; //导入方法依赖的package包/类
@Override
public boolean equals(Object obj) {
return obj instanceof LogEvent
&& Objects.deepEquals(this.toArray(), ((LogEvent)obj).toArray());
}
示例13: innerEquals
import java.util.Objects; //导入方法依赖的package包/类
@Override
protected boolean innerEquals(BucketMetricsPipelineAggregationBuilder<PercentilesBucketPipelineAggregationBuilder> obj) {
PercentilesBucketPipelineAggregationBuilder other = (PercentilesBucketPipelineAggregationBuilder) obj;
return Objects.deepEquals(percents, other.percents);
}
示例14: cmp
import java.util.Objects; //导入方法依赖的package包/类
public static boolean cmp(Value value, Value o) {
return Objects.deepEquals(value.asObj(), o.asObj());
}
示例15: isDuplicate
import java.util.Objects; //导入方法依赖的package包/类
public Boolean isDuplicate(ExecutionStep step) {
return Objects.deepEquals(step.exeStepDetails, exeStepDetails);
}