/** * Compares this type-specific big-array list to another one. * * <p> * This method exists only for sake of efficiency. The implementation inherited * from the abstract implementation would already work. * * @param l * a type-specific big-array list. * @return true if the argument contains the same elements of this type-specific * big-array list. */ public boolean equals(final BooleanBigArrayBigList l) { if (l == this) return true; long s = size64(); if (s != l.size64()) return false; final boolean[][] a1 = a; final boolean[][] a2 = l.a; while (s-- != 0) if (BooleanBigArrays.get(a1, s) != BooleanBigArrays.get(a2, s)) return false; return true; } /**
/** * Compares this big list to another big list. * * <p> * This method exists only for sake of efficiency. The implementation inherited * from the abstract implementation would already work. * * @param l * a big list. * @return a negative integer, zero, or a positive integer as this big list is * lexicographically less than, equal to, or greater than the argument. */ public int compareTo(final BooleanBigArrayBigList l) { final long s1 = size64(), s2 = l.size64(); final boolean a1[][] = a, a2[][] = l.a; boolean e1, e2; int r, i; for (i = 0; i < s1 && i < s2; i++) { e1 = BooleanBigArrays.get(a1, i); e2 = BooleanBigArrays.get(a2, i); if ((r = (Boolean.compare((e1), (e2)))) != 0) return r; } return i < s2 ? -1 : (i < s1 ? 1 : 0); } private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {