Java Random equalsRandomIterable(List a, List bl)

Here you can find the source of equalsRandomIterable(List a, List bl)

Description

equals Random Iterable

License

Open Source License

Declaration

private static boolean equalsRandomIterable(List<?> a, List<?> bl) 

Method Source Code

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

import java.util.*;

public class Main {
    private static boolean equalsRandomIterable(List<?> a, List<?> bl) {
        Iterator<?> it = bl.iterator();
        for (Object anA : a) {
            if (it.hasNext()) {
                Object o2 = it.next();
                if (anA == o2)
                    continue;
                if (anA == null)
                    return false;
                if (!anA.equals(o2))
                    return false;
            } else
                return false;
        }//from   w  ww .  j a  v a2  s .c om
        return !it.hasNext();

    }
}

Related

  1. createRandomStr(int digit)
  2. decimal_random()
  3. extractRandomObject(Collection c)
  4. extractRandomVector(Collection c, int newSize)
  5. gaussianInt(Random random, int min, int max)
  6. generateRandom(byte[] byteArray)