Java Object Compare areEquals(Object... objs)

Here you can find the source of areEquals(Object... objs)

Description

are Equals

License

Open Source License

Declaration

public static boolean areEquals(Object... objs) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean areEquals(Object... objs) {
        boolean areEquals = true;
        if (objs != null && objs.length > 1) {
            for (int i = 0; i < objs.length - 1 && areEquals; i++) {
                areEquals &= (objs[i] == null && objs[i + 1] == null)
                        || (objs[i] != null && objs[i].equals(objs[i + 1]));
            }/*from   ww  w .  j  a va  2  s .co  m*/
        }
        return areEquals;
    }
}

Related

  1. areEqualComparables(T object1, T object2)
  2. areEqualEvenIfBothNull(Object first, Object second)
  3. areEquals(final Object o1, final Object o2)
  4. areEquals(Object a, Object b)
  5. areEquals(Object arg0, Object arg1)
  6. areEqualsDirect(Object bean, Object other, Object... properties)
  7. equivalent(Object thisObj, Object thatObj)