The <code>nin</code> operator is similar to $in except that it selects objects for
which the specified field does not have any value in the specified array.

@param c the values to match against
@return the criteria
508005
public Criteria nin(Collection<?> c) {
        notNull(c, "collection can not be null");
        this.criteriaType = RelationalOperator.NIN;
        this.right = new ValueListNode(c);
        return this;
    }
1167855
public static Field[] getFields(Class<?> c) {
		Field[] allFields = c.getDeclaredFields();
		Field[] fields = new Field[allFields.length];
		int n = 0;
		for(Field f : allFields) {
			f.setAccessible(true);
			IgnoreField anno = f.getAnnotation(IgnoreField.class);
			if(anno == null) {
				fields[n] = f;
				n++;
			}
		}
		return Arrays.copyOf(fields, n);
	}
288129
@SuppressWarnings("rawtypes")
    public static <T> List<T> topp(final Collection<? extends T> c, final int fromIndex, final int toIndex, final int n, final Comparator<? super T> cmp) {
        N.checkArgNotNegative(n, "n");

        if (n == 0) {
            return new ArrayList<>();
        } else if (n >= toIndex - fromIndex) {
            if (fromIndex == 0 && toIndex == c.size()) {
                return new ArrayList<>(c);
            } else {
                final List<T> res = new ArrayList<>(toIndex - fromIndex);
                final Iterator<? extends T> iter = c.iterator();
                T e = null;

                for (int i = 0; i < toIndex && iter.hasNext(); i++) {
                    e = iter.next();

                    if (i < fromIndex) {
                        continue;
                    }

                    res.add(e);
                }

                return res;
            }
        }

        final Comparator<Indexed<T>> comparator = cmp == null ? (Comparator) new Comparator<Indexed<Comparable>>() {
            @Override
            public int compare(final Indexed<Comparable> o1, final Indexed<Comparable> o2) {
                return N.compare(o1.value(), o2.value());
            }
        } : new Comparator<Indexed<T>>() {
            @Override
            public int compare(final Indexed<T> o1, final Indexed<T> o2) {
                return cmp.compare(o1.value(), o2.value());
            }
        };

        final Queue<Indexed<T>> heap = new PriorityQueue<>(n, comparator);

        if (c instanceof List && c instanceof RandomAccess) {
            final List<T> list = (List<T>) c;
            Indexed<T> indexed = null;
            T e = null;

            for (int i = fromIndex; i < toIndex; i++) {
                e = list.get(i);

                indexed = Indexed.of(e, i);

                if (heap.size() >= n) {
                    if (comparator.compare(heap.peek(), indexed) < 0) {
                        heap.poll();
                        heap.add(indexed);
                    }
                } else {
                    heap.offer(indexed);
                }
            }
        } else {
            final Iterator<? extends T> iter = c.iterator();
            Indexed<T> indexed = null;
            T e = null;

            for (int i = 0; i < toIndex && iter.hasNext(); i++) {
                e = iter.next();

                if (i < fromIndex) {
                    continue;
                }

                indexed = Indexed.of(e, i);

                if (heap.size() >= n) {
                    if (comparator.compare(heap.peek(), indexed) < 0) {
                        heap.poll();
                        heap.add(indexed);
                    }
                } else {
                    heap.offer(indexed);
                }
            }
        }

        final Indexed<T>[] arrayOfIndexed = heap.toArray(new Indexed[heap.size()]);

        N.sort(arrayOfIndexed, new Comparator<Indexed<T>>() {
            @Override
            public int compare(final Indexed<T> o1, final Indexed<T> o2) {
                return o1.index() - o2.index();
            }
        });

        final List<T> res = new ArrayList<>(arrayOfIndexed.length);

        for (int i = 0, len = arrayOfIndexed.length; i < len; i++) {
            res.add(arrayOfIndexed[i].value());
        }

        return res;
    }
279059
public static <T> boolean containsObject(Collection<T> c, T o) {
    for (Object o1 : c) {
      if (o == o1) {
        return true;
      }
    }
    return false;
  }
560074
public Criteria in(Collection<?> c) {
        notNull(c, "collection can not be null");
        this.criteriaType = RelationalOperator.IN;
        this.right = new ValueListNode(c);
        return this;
    }
774745
public static int findNot(int[] array, int value) {

        for (int i = 0; i < array.length; i++) {
            if (array[i] != value) {
                return i;
            }
        }

        return -1;
    }
858713
@Override
	public String initValuesImpl(final FieldCase c) {
		if (c == FieldCase.NULL) {
			return null;
		}
		String value = source.initValues(c);
		if (value == null) {
			return defaultValue;
		}
		return value;
	}
668923
@SuppressWarnings("unchecked")
    public static <T> boolean deleteRange(final List<T> c, final int fromIndex, final int toIndex) {
        N.checkFromToIndex(fromIndex, toIndex, c.size());

        if (fromIndex == toIndex) {
            return false;
        }

        if (c instanceof LinkedList || toIndex - fromIndex <= 3) {
            c.subList(fromIndex, toIndex).clear();
        } else {
            if (isListElementDataFieldGettable && isListElementDataFieldSettable && listElementDataField != null && c instanceof ArrayList) {
                T[] array = null;

                try {
                    array = (T[]) listElementDataField.get(c);
                    N.copy(array, toIndex, array, fromIndex, c.size() - toIndex);
                    listSizeField.set(c, c.size() - (toIndex - fromIndex));
                    // update modCount
                    c.add(null);
                    c.remove(c.size() - 1);
                    return true;
                } catch (Throwable e) {
                    // ignore;
                    isListElementDataFieldSettable = false;
                }
            }

            final List<T> tmp = new ArrayList<>(c.size() - (toIndex - fromIndex));

            if (fromIndex > 0) {
                tmp.addAll(c.subList(0, fromIndex));
            }

            if (toIndex < c.size()) {
                tmp.addAll(c.subList(toIndex, c.size()));
            }

            c.clear();
            c.addAll(tmp);
        }

        return true;
    }
1099859
public static <T> List<T> repeatAll(final Collection<T> c, final int n) {
        N.checkArgNotNegative(n, "n");

        if (n == 0 || isNullOrEmpty(c)) {
            return new ArrayList<T>();
        }

        final List<T> result = new ArrayList<>(c.size() * n);

        for (int i = 0; i < n; i++) {
            result.addAll(c);
        }

        return result;
    }
451333
public static <T> List<T> distinct(final Collection<? extends T> c) {
        if (N.isNullOrEmpty(c)) {
            return new ArrayList<>();
        }

        return distinct(c, 0, c.size());
    }
80138
public Criteria in(Iterable<?> values) {
		Assert.notNull(values, "Collection of 'in' values must not be null");
		for (Object value : values) {
			if (value instanceof Collection) {
				in((Collection<?>) value);
			} else {
				is(value);
			}
		}
		return this;
	}
787397
public Expression<String> in(String[] value) {
		String listString = "";
		Boolean firstString = true;
		for (String v : value) {
			if (firstString) {
				listString = listString.concat("('").concat(v).concat("'");
				firstString = false;
			} else {
				listString = listString.concat(", '").concat(v).concat("'");
			}
		}
		listString = listString.concat(")");
		return new Expression<String>(this, Operation.in, listString);
	}
318846
public int getValue(int c, int column) {
        if (isCompacted || c < 0 || c > MAX_CP || column < 0
                || column >= (columns - 2)) {
            return 0;
        }
        int index = findRow(c);
        return v[index + 2 + column];
    }
719038
public static Field[] collectInstanceFields(Class<?> c, Class<?> limitExclusive) {
    	
        return collectFields(c, 0, Modifier.STATIC, limitExclusive);
    }
874441
public static int compare (Comparable<?> c1, Comparable<?> c2)
    {
        @SuppressWarnings("unchecked") Comparable<Object> cc1 = (Comparable<Object>)c1;
        @SuppressWarnings("unchecked") Comparable<Object> cc2 = (Comparable<Object>)c2;
        return cc1.compareTo(cc2);
    }
828699
public static PredicateExpression nin(Object... rhs) {
        PredicateExpression ex = new PredicateExpression("$nin", rhs);
        if (rhs.length == 1) {
            ex.single = true;
        }
        return ex;
    }
928601
@Override
	public boolean addAll(Collection<? extends Integer> c) {
		Iterator<? extends Integer> iter=c.iterator();
		boolean didOne=false;
		while(iter.hasNext()) {
			add(iter.next().intValue());
			didOne=true;
		}
		return didOne;
	}