org.openide.util.Utilities.compareObjectsImpl()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(80)

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

Utilities.compareObjectsImpl介绍

[英]Safe equality check with array recursion.

Use java.util.Objects.deepEquals in JDK 7.
[中]使用数组递归进行安全的相等性检查。
使用java。util。物体。JDK 7中的deepEquals。

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-util

/** Safe equality check.
* The supplied objects are equal if: <UL>
* <LI> both are <code>null</code>
* <LI> both are arrays with same length and equal items (if the items are arrays,
*      they are <em>not</em> checked the same way again)
* <LI> the two objects are {@link Object#equals}
* </UL>
* This method is <code>null</code>-safe, so if one of the parameters is true and the second not,
* it returns <code>false</code>.
* <p>Use {@code java.util.Objects.deepEquals} in JDK 7.
* @param  o1 the first object to compare
* @param  o2 the second object to compare
* @return <code>true</code> if the objects are equal
*/
public static boolean compareObjects(Object o1, Object o2) {
  return compareObjectsImpl(o1, o2, 1);
}

代码示例来源:origin: org.netbeans.api/org-openide-util

if (!compareObjectsImpl(o1a[i], o2a[i], checkArraysDepth - 1)) {
  return false;

代码示例来源:origin: in.jlibs/org-openide-util

/** Safe equality check.
* The supplied objects are equal if: <UL>
* <LI> both are <code>null</code>
* <LI> both are arrays with same length and equal items (if the items are arrays,
*      they are <em>not</em> checked the same way again)
* <LI> the two objects are {@link Object#equals}
* </UL>
* This method is <code>null</code>-safe, so if one of the parameters is true and the second not,
* it returns <code>false</code>.
* @param  o1 the first object to compare
* @param  o2 the second object to compare
* @return <code>true</code> if the objects are equal
*/
public static boolean compareObjects(Object o1, Object o2) {
  return compareObjectsImpl(o1, o2, 1);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Safe equality check.
* The supplied objects are equal if: <UL>
* <LI> both are <code>null</code>
* <LI> both are arrays with same length and equal items (if the items are arrays,
*      they are <em>not</em> checked the same way again)
* <LI> the two objects are {@link Object#equals}
* </UL>
* This method is <code>null</code>-safe, so if one of the parameters is true and the second not,
* it returns <code>false</code>.
* @param  o1 the first object to compare
* @param  o2 the second object to compare
* @return <code>true</code> if the objects are equal
*/
public static boolean compareObjects (Object o1, Object o2) {
  return compareObjectsImpl (o1, o2, 1);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Safe equality check.
* The supplied objects are equal if: <UL>
* <LI> both are <code>null</code>
* <LI> both are arrays with same length and equal items (if the items are arrays,
*      they are <em>not</em> checked the same way again)
* <LI> the two objects are {@link Object#equals}
* </UL>
* This method is <code>null</code>-safe, so if one of the parameters is true and the second not,
* it returns <code>false</code>.
* @param  o1 the first object to compare
* @param  o2 the second object to compare
* @return <code>true</code> if the objects are equal
*/
public static boolean compareObjects (Object o1, Object o2) {
  return compareObjectsImpl (o1, o2, 1);
}

代码示例来源:origin: uk.gov.nationalarchives.thirdparty.netbeans/org-openide-util

/** Safe equality check.
* The supplied objects are equal if: <UL>
* <LI> both are <code>null</code>
* <LI> both are arrays with same length and equal items (if the items are arrays,
*      they are <em>not</em> checked the same way again)
* <LI> the two objects are {@link Object#equals}
* </UL>
* This method is <code>null</code>-safe, so if one of the parameters is true and the second not,
* it returns <code>false</code>.
* <p>Use {@code java.util.Objects.deepEquals} in JDK 7.
* @param  o1 the first object to compare
* @param  o2 the second object to compare
* @return <code>true</code> if the objects are equal
*/
public static boolean compareObjects(Object o1, Object o2) {
  return compareObjectsImpl(o1, o2, 1);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

if (l1 != l2) return false;
for (int i = 0; i < l1; i++) {
  if (! compareObjectsImpl (o1a[i], o2a[i], checkArraysDepth - 1)) {
    return false;

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

if (l1 != l2) return false;
for (int i = 0; i < l1; i++) {
  if (! compareObjectsImpl (o1a[i], o2a[i], checkArraysDepth - 1)) {
    return false;

代码示例来源:origin: in.jlibs/org-openide-util

if (!compareObjectsImpl(o1a[i], o2a[i], checkArraysDepth - 1)) {
  return false;

代码示例来源:origin: uk.gov.nationalarchives.thirdparty.netbeans/org-openide-util

if (!compareObjectsImpl(o1a[i], o2a[i], checkArraysDepth - 1)) {
  return false;

相关文章