Here you can find the source of isEqualBasicCol(Collection col1, Collection col2)
Parameter | Description |
---|---|
col1 | a parameter |
col2 | a parameter |
public static int isEqualBasicCol(Collection col1, Collection col2)
//package com.java2s; import java.util.Collection; public class Main { private final static int B_FALSE = 0; private final static int B_UNKNOWN = 1; private final static int B_TRUE = 2; /**/*w w w . j a v a 2 s.c o m*/ * @param col1 * @param col2 * @return */ public static int isEqualBasicCol(Collection col1, Collection col2) { if (col1 == col2) { return B_TRUE; } else if (col1 == null || col2 == null) { if (col1 == null) { if (col2.size() == 0) return B_TRUE; else return B_FALSE; } else { if (col1.size() == 0) return B_TRUE; else return B_FALSE; } } else { if (col1.size() == col2.size()) return B_UNKNOWN; else return B_FALSE; } } }