target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testSizeIsEmpty_Null() { assertEquals(true, CollectionUtils.sizeIsEmpty(null)); } | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_List() { final List<String> list = new ArrayList<String>(); assertEquals(true, CollectionUtils.sizeIsEmpty(list)); list.add("a"); assertEquals(false, CollectionUtils.sizeIsEmpty(list)); } | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_Map() { final Map<String, String> map = new HashMap<String, String>(); assertEquals(true, CollectionUtils.sizeIsEmpty(map)); map.put("1", "a"); assertEquals(false, CollectionUtils.sizeIsEmpty(map)); } | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_Array() { final Object[] objectArray = new Object[0]; assertEquals(true, CollectionUtils.sizeIsEmpty(objectArray)); final String[] stringArray = new String[3]; assertEquals(false, CollectionUtils.sizeIsEmpty(stringArray)); stringArray[0] = "a"; stringArray[1] = "b"; stringArray[2] = "c... | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_PrimitiveArray() { final int[] intArray = new int[0]; assertEquals(true, CollectionUtils.sizeIsEmpty(intArray)); final double[] doubleArray = new double[3]; assertEquals(false, CollectionUtils.sizeIsEmpty(doubleArray)); doubleArray[0] = 0.0d; doubleArray[1] = 1.0d; doubleArray[2] = 2.5... | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testQuerySet() throws Exception { TypeToken<User> pt = TypeToken.of(User.class); TypeToken<Set<User>> rt = new TypeToken<Set<User>>() { }; String srcSql = "select * from user where id=:1.id and name=:1.name"; AbstractOperator operator = getOperator(pt, rt, srcSql, new ArrayList<Annotation>()); operato... | @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... |
@Test public void testGetTypes() throws Exception { TypeToken<HashMap<String, Integer>> t = new TypeToken<HashMap<String, Integer>>() { }; Set<TypeToken<?>> types = t.getTypes(); assertThat(types.size(), equalTo(6)); types.contains(new TypeToken<Map<String, Integer>>() { }); types.contains(new TypeToken<HashMap<String,... | Set<TypeToken<?>> getTypes() { Set<TypeToken<?>> tokens = new HashSet<TypeToken<?>>(); tokens.add(this); TypeToken<?> superclass = getGenericSuperclass(); if (superclass != null) { tokens.add(superclass); tokens.addAll(superclass.getTypes()); } List<TypeToken<?>> interfaces = getGenericInterfaces(); for (TypeToken<?> a... | TypeToken extends TypeCapture<T> implements Serializable { Set<TypeToken<?>> getTypes() { Set<TypeToken<?>> tokens = new HashSet<TypeToken<?>>(); tokens.add(this); TypeToken<?> superclass = getGenericSuperclass(); if (superclass != null) { tokens.add(superclass); tokens.addAll(superclass.getTypes()); } List<TypeToken<?... | TypeToken extends TypeCapture<T> implements Serializable { Set<TypeToken<?>> getTypes() { Set<TypeToken<?>> tokens = new HashSet<TypeToken<?>>(); tokens.add(this); TypeToken<?> superclass = getGenericSuperclass(); if (superclass != null) { tokens.add(superclass); tokens.addAll(superclass.getTypes()); } List<TypeToken<?... | TypeToken extends TypeCapture<T> implements Serializable { Set<TypeToken<?>> getTypes() { Set<TypeToken<?>> tokens = new HashSet<TypeToken<?>>(); tokens.add(this); TypeToken<?> superclass = getGenericSuperclass(); if (superclass != null) { tokens.add(superclass); tokens.addAll(superclass.getTypes()); } List<TypeToken<?... | TypeToken extends TypeCapture<T> implements Serializable { Set<TypeToken<?>> getTypes() { Set<TypeToken<?>> tokens = new HashSet<TypeToken<?>>(); tokens.add(this); TypeToken<?> superclass = getGenericSuperclass(); if (superclass != null) { tokens.add(superclass); tokens.addAll(superclass.getTypes()); } List<TypeToken<?... |
@Test public void testSizeIsEmpty_Enumeration() { final Vector<String> list = new Vector<String>(); assertEquals(true, CollectionUtils.sizeIsEmpty(list.elements())); list.add("a"); assertEquals(false, CollectionUtils.sizeIsEmpty(list.elements())); final Enumeration<String> en = list.elements(); en.nextElement(); assert... | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_Iterator() { final List<String> list = new ArrayList<String>(); assertEquals(true, CollectionUtils.sizeIsEmpty(list.iterator())); list.add("a"); assertEquals(false, CollectionUtils.sizeIsEmpty(list.iterator())); final Iterator<String> it = list.iterator(); it.next(); assertEquals(true,... | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testSizeIsEmpty_Other() { try { CollectionUtils.sizeIsEmpty("not a list"); fail("Expecting IllegalArgumentException"); } catch (final IllegalArgumentException ex) { } } | public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanceof Map<?, ?>) { r... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... | CollectionUtils { public static boolean sizeIsEmpty(final Object object) { if (object == null) { return true; } else if (object instanceof Collection<?>) { return ((Collection<?>) object).isEmpty(); } else if (object instanceof Iterable<?>) { return IterableUtils.isEmpty((Iterable<?>) object); } else if (object instanc... |
@Test public void testIsEmptyWithEmptyCollection() { final Collection<Object> coll = new ArrayList<Object>(); assertEquals(true, CollectionUtils.isEmpty(coll)); } | public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... |
@Test public void testIsEmptyWithNonEmptyCollection() { final Collection<String> coll = new ArrayList<String>(); coll.add("item"); assertEquals(false, CollectionUtils.isEmpty(coll)); } | public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... |
@Test public void testIsEmptyWithNull() { final Collection<?> coll = null; assertEquals(true, CollectionUtils.isEmpty(coll)); } | public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... |
@Test public void testIsNotEmptyWithEmptyCollection() { final Collection<Object> coll = new ArrayList<Object>(); assertEquals(false, CollectionUtils.isNotEmpty(coll)); } | public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... |
@Test public void testIsNotEmptyWithNonEmptyCollection() { final Collection<String> coll = new ArrayList<String>(); coll.add("item"); assertEquals(true, CollectionUtils.isNotEmpty(coll)); } | public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... |
@Test public void testIsNotEmptyWithNull() { final Collection<?> coll = null; assertEquals(false, CollectionUtils.isNotEmpty(coll)); } | public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); } | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... | CollectionUtils { public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collection is compati... |
@Test public void filter() { final List<Integer> ints = new ArrayList<Integer>(); ints.add(1); ints.add(2); ints.add(3); ints.add(3); final Iterable<Integer> iterable = ints; assertTrue(CollectionUtils.filter(iterable, EQUALS_TWO)); assertEquals(1, ints.size()); assertEquals(2, (int) ints.get(0)); } | public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = true; } } } return... | CollectionUtils { public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = ... | CollectionUtils { public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = ... | CollectionUtils { public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = ... | CollectionUtils { public static <T> boolean filter(final Iterable<T> collection, final Predicate<? super T> predicate) { boolean result = false; if (collection != null && predicate != null) { for (final Iterator<T> it = collection.iterator(); it.hasNext();) { if (!predicate.evaluate(it.next())) { it.remove(); result = ... |
@Test public void testQueryArray() throws Exception { TypeToken<User> pt = TypeToken.of(User.class); TypeToken<User[]> rt = TypeToken.of(User[].class); String srcSql = "select * from user where id=:1.id and name=:1.name"; AbstractOperator operator = getOperator(pt, rt, srcSql, new ArrayList<Annotation>()); operator.set... | @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... |
@Test public void filterInverse() { final List<Integer> ints = new ArrayList<Integer>(); ints.add(1); ints.add(2); ints.add(3); ints.add(3); final Iterable<Integer> iterable = ints; assertTrue(CollectionUtils.filterInverse(iterable, EQUALS_TWO)); assertEquals(3, ints.size()); assertEquals(1, (int) ints.get(0)); assertE... | public static <T> boolean filterInverse(final Iterable<T> collection, final Predicate<? super T> predicate) { return filter(collection, predicate == null ? null : PredicateUtils.notPredicate(predicate)); } | CollectionUtils { public static <T> boolean filterInverse(final Iterable<T> collection, final Predicate<? super T> predicate) { return filter(collection, predicate == null ? null : PredicateUtils.notPredicate(predicate)); } } | CollectionUtils { public static <T> boolean filterInverse(final Iterable<T> collection, final Predicate<? super T> predicate) { return filter(collection, predicate == null ? null : PredicateUtils.notPredicate(predicate)); } private CollectionUtils(); } | CollectionUtils { public static <T> boolean filterInverse(final Iterable<T> collection, final Predicate<? super T> predicate) { return filter(collection, predicate == null ? null : PredicateUtils.notPredicate(predicate)); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible... | CollectionUtils { public static <T> boolean filterInverse(final Iterable<T> collection, final Predicate<? super T> predicate) { return filter(collection, predicate == null ? null : PredicateUtils.notPredicate(predicate)); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible... |
@Test @Deprecated public void countMatches() { assertEquals(4, CollectionUtils.countMatches(iterableB, EQUALS_TWO)); assertEquals(0, CollectionUtils.countMatches(iterableA, null)); assertEquals(0, CollectionUtils.countMatches(null, EQUALS_TWO)); assertEquals(0, CollectionUtils.countMatches(null, null)); } | @Deprecated public static <C> int countMatches(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? 0 : (int) IterableUtils.countMatches(input, predicate); } | CollectionUtils { @Deprecated public static <C> int countMatches(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? 0 : (int) IterableUtils.countMatches(input, predicate); } } | CollectionUtils { @Deprecated public static <C> int countMatches(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? 0 : (int) IterableUtils.countMatches(input, predicate); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <C> int countMatches(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? 0 : (int) IterableUtils.countMatches(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any... | CollectionUtils { @Deprecated public static <C> int countMatches(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? 0 : (int) IterableUtils.countMatches(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any... |
@Test @Deprecated public void exists() { final List<Integer> list = new ArrayList<Integer>(); assertFalse(CollectionUtils.exists(null, null)); assertFalse(CollectionUtils.exists(list, null)); assertFalse(CollectionUtils.exists(null, EQUALS_TWO)); assertFalse(CollectionUtils.exists(list, EQUALS_TWO)); list.add(1); list.... | @Deprecated public static <C> boolean exists(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAny(input, predicate); } | CollectionUtils { @Deprecated public static <C> boolean exists(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAny(input, predicate); } } | CollectionUtils { @Deprecated public static <C> boolean exists(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAny(input, predicate); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <C> boolean exists(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAny(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type ... | CollectionUtils { @Deprecated public static <C> boolean exists(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAny(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type ... |
@Test public void select() { final List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(2); list.add(3); list.add(4); final Collection<Integer> output1 = CollectionUtils.select(list, EQUALS_TWO); final Collection<Number> output2 = CollectionUtils.<Number>select(list, EQUALS_TWO); final HashSet<Number> o... | public static <O> Collection<O> select(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return select(inputCollection, predicate, a... | CollectionUtils { public static <O> Collection<O> select(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return select(inputCollec... | CollectionUtils { public static <O> Collection<O> select(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return select(inputCollec... | CollectionUtils { public static <O> Collection<O> select(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return select(inputCollec... | CollectionUtils { public static <O> Collection<O> select(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return select(inputCollec... |
@Test public void selectRejected() { final List<Long> list = new ArrayList<Long>(); list.add(1L); list.add(2L); list.add(3L); list.add(4L); final Collection<Long> output1 = CollectionUtils.selectRejected(list, EQUALS_TWO); final Collection<? extends Number> output2 = CollectionUtils.selectRejected(list, EQUALS_TWO); fi... | public static <O> Collection<O> selectRejected(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return selectRejected(inputCollecti... | CollectionUtils { public static <O> Collection<O> selectRejected(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return selectReje... | CollectionUtils { public static <O> Collection<O> selectRejected(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return selectReje... | CollectionUtils { public static <O> Collection<O> selectRejected(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return selectReje... | CollectionUtils { public static <O> Collection<O> selectRejected(final Iterable<? extends O> inputCollection, final Predicate<? super O> predicate) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return selectReje... |
@Test public void collect() { final Transformer<Number, Long> transformer = TransformerUtils.constantTransformer(2L); Collection<Number> collection = CollectionUtils.<Integer, Number>collect(iterableA, transformer); assertTrue(collection.size() == collectionA.size()); assertCollectResult(collection); ArrayList<Number> ... | public static <I, O> Collection<O> collect(final Iterable<I> inputCollection, final Transformer<? super I, ? extends O> transformer) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return collect(inputCollection, ... | CollectionUtils { public static <I, O> Collection<O> collect(final Iterable<I> inputCollection, final Transformer<? super I, ? extends O> transformer) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return collect... | CollectionUtils { public static <I, O> Collection<O> collect(final Iterable<I> inputCollection, final Transformer<? super I, ? extends O> transformer) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return collect... | CollectionUtils { public static <I, O> Collection<O> collect(final Iterable<I> inputCollection, final Transformer<? super I, ? extends O> transformer) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return collect... | CollectionUtils { public static <I, O> Collection<O> collect(final Iterable<I> inputCollection, final Transformer<? super I, ? extends O> transformer) { final Collection<O> answer = inputCollection instanceof Collection<?> ? new ArrayList<O>(((Collection<?>) inputCollection).size()) : new ArrayList<O>(); return collect... |
@Test public void addIgnoreNull() { final Set<String> set = new HashSet<String>(); set.add("1"); set.add("2"); set.add("3"); assertFalse(CollectionUtils.addIgnoreNull(set, null)); assertEquals(3, set.size()); assertFalse(CollectionUtils.addIgnoreNull(set, "1")); assertEquals(3, set.size()); assertEquals(true, Collectio... | public static <T> boolean addIgnoreNull(final Collection<T> collection, final T object) { if (collection == null) { throw new NullPointerException("The collection must not be null"); } return object != null && collection.add(object); } | CollectionUtils { public static <T> boolean addIgnoreNull(final Collection<T> collection, final T object) { if (collection == null) { throw new NullPointerException("The collection must not be null"); } return object != null && collection.add(object); } } | CollectionUtils { public static <T> boolean addIgnoreNull(final Collection<T> collection, final T object) { if (collection == null) { throw new NullPointerException("The collection must not be null"); } return object != null && collection.add(object); } private CollectionUtils(); } | CollectionUtils { public static <T> boolean addIgnoreNull(final Collection<T> collection, final T object) { if (collection == null) { throw new NullPointerException("The collection must not be null"); } return object != null && collection.add(object); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, ... | CollectionUtils { public static <T> boolean addIgnoreNull(final Collection<T> collection, final T object) { if (collection == null) { throw new NullPointerException("The collection must not be null"); } return object != null && collection.add(object); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, ... |
@Test public void predicatedCollection() { final Predicate<Object> predicate = PredicateUtils.instanceofPredicate(Integer.class); Collection<Number> collection = CollectionUtils.predicatedCollection(new ArrayList<Number>(), predicate); assertTrue("returned object should be a PredicatedCollection", collection instanceof... | public static <C> Collection<C> predicatedCollection(final Collection<C> collection, final Predicate<? super C> predicate) { return PredicatedCollection.predicatedCollection(collection, predicate); } | CollectionUtils { public static <C> Collection<C> predicatedCollection(final Collection<C> collection, final Predicate<? super C> predicate) { return PredicatedCollection.predicatedCollection(collection, predicate); } } | CollectionUtils { public static <C> Collection<C> predicatedCollection(final Collection<C> collection, final Predicate<? super C> predicate) { return PredicatedCollection.predicatedCollection(collection, predicate); } private CollectionUtils(); } | CollectionUtils { public static <C> Collection<C> predicatedCollection(final Collection<C> collection, final Predicate<? super C> predicate) { return PredicatedCollection.predicatedCollection(collection, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with ... | CollectionUtils { public static <C> Collection<C> predicatedCollection(final Collection<C> collection, final Predicate<? super C> predicate) { return PredicatedCollection.predicatedCollection(collection, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with ... |
@Test public void isFull() { final Set<String> set = new HashSet<String>(); set.add("1"); set.add("2"); set.add("3"); try { CollectionUtils.isFull(null); fail(); } catch (final NullPointerException ex) { } assertFalse(CollectionUtils.isFull(set)); final CircularFifoQueue<String> buf = new CircularFifoQueue<String>(set)... | public static boolean isFull(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).isFull(); } try { final BoundedCollection<?> bcoll = UnmodifiableBoundedCollectio... | CollectionUtils { public static boolean isFull(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).isFull(); } try { final BoundedCollection<?> bcoll = Unmodifiab... | CollectionUtils { public static boolean isFull(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).isFull(); } try { final BoundedCollection<?> bcoll = Unmodifiab... | CollectionUtils { public static boolean isFull(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).isFull(); } try { final BoundedCollection<?> bcoll = Unmodifiab... | CollectionUtils { public static boolean isFull(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).isFull(); } try { final BoundedCollection<?> bcoll = Unmodifiab... |
@Test public void isEmpty() { assertFalse(CollectionUtils.isNotEmpty(null)); assertTrue(CollectionUtils.isNotEmpty(collectionA)); } | public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); } | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... | CollectionUtils { public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, empty collecti... |
@Test public void testQueryIn() throws Exception { TypeToken<List<Integer>> pt = new TypeToken<List<Integer>>() { }; TypeToken<List<User>> rt = new TypeToken<List<User>>() { }; String srcSql = "select * from user where id in (:1)"; AbstractOperator operator = getOperator(pt, rt, srcSql, new ArrayList<Annotation>()); op... | @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... |
@Test public void maxSize() { final Set<String> set = new HashSet<String>(); set.add("1"); set.add("2"); set.add("3"); try { CollectionUtils.maxSize(null); fail(); } catch (final NullPointerException ex) { } assertEquals(-1, CollectionUtils.maxSize(set)); final Queue<String> buf = new CircularFifoQueue<String>(set); as... | public static int maxSize(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).maxSize(); } try { final BoundedCollection<?> bcoll = UnmodifiableBoundedCollection.... | CollectionUtils { public static int maxSize(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).maxSize(); } try { final BoundedCollection<?> bcoll = Unmodifiable... | CollectionUtils { public static int maxSize(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).maxSize(); } try { final BoundedCollection<?> bcoll = Unmodifiable... | CollectionUtils { public static int maxSize(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).maxSize(); } try { final BoundedCollection<?> bcoll = Unmodifiable... | CollectionUtils { public static int maxSize(final Collection<? extends Object> coll) { if (coll == null) { throw new NullPointerException("The collection must not be null"); } if (coll instanceof BoundedCollection) { return ((BoundedCollection<?>) coll).maxSize(); } try { final BoundedCollection<?> bcoll = Unmodifiable... |
@Test public void testRetainAll() { final List<String> base = new ArrayList<String>(); base.add("A"); base.add("B"); base.add("C"); final List<Object> sub = new ArrayList<Object>(); sub.add("A"); sub.add("C"); sub.add("X"); final Collection<String> result = CollectionUtils.retainAll(base, sub); assertEquals(2, result.s... | public static <C> Collection<C> retainAll(final Collection<C> collection, final Collection<?> retain) { return ListUtils.retainAll(collection, retain); } | CollectionUtils { public static <C> Collection<C> retainAll(final Collection<C> collection, final Collection<?> retain) { return ListUtils.retainAll(collection, retain); } } | CollectionUtils { public static <C> Collection<C> retainAll(final Collection<C> collection, final Collection<?> retain) { return ListUtils.retainAll(collection, retain); } private CollectionUtils(); } | CollectionUtils { public static <C> Collection<C> retainAll(final Collection<C> collection, final Collection<?> retain) { return ListUtils.retainAll(collection, retain); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(... | CollectionUtils { public static <C> Collection<C> retainAll(final Collection<C> collection, final Collection<?> retain) { return ListUtils.retainAll(collection, retain); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(... |
@Test public void testRemoveAll() { final List<String> base = new ArrayList<String>(); base.add("A"); base.add("B"); base.add("C"); final List<String> sub = new ArrayList<String>(); sub.add("A"); sub.add("C"); sub.add("X"); final Collection<String> result = CollectionUtils.removeAll(base, sub); assertEquals(1, result.s... | public static <E> Collection<E> removeAll(final Collection<E> collection, final Collection<?> remove) { return ListUtils.removeAll(collection, remove); } | CollectionUtils { public static <E> Collection<E> removeAll(final Collection<E> collection, final Collection<?> remove) { return ListUtils.removeAll(collection, remove); } } | CollectionUtils { public static <E> Collection<E> removeAll(final Collection<E> collection, final Collection<?> remove) { return ListUtils.removeAll(collection, remove); } private CollectionUtils(); } | CollectionUtils { public static <E> Collection<E> removeAll(final Collection<E> collection, final Collection<?> remove) { return ListUtils.removeAll(collection, remove); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(... | CollectionUtils { public static <E> Collection<E> removeAll(final Collection<E> collection, final Collection<?> remove) { return ListUtils.removeAll(collection, remove); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(... |
@Test public void testTransformedCollection() { final Transformer<Object, Object> transformer = TransformerUtils.nopTransformer(); Collection<Object> collection = CollectionUtils.transformingCollection(new ArrayList<Object>(), transformer); assertTrue("returned object should be a TransformedCollection", collection inst... | public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collec... | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collec... |
@Test public void testTransformedCollection_2() { final List<Object> list = new ArrayList<Object>(); list.add("1"); list.add("2"); list.add("3"); final Collection<Object> result = CollectionUtils.transformingCollection(list, TRANSFORM_TO_INTEGER); assertEquals(true, result.contains("1")); assertEquals(true, result.cont... | public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); } | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collec... | CollectionUtils { public static <E> Collection<E> transformingCollection(final Collection<E> collection, final Transformer<? super E, ? extends E> transformer) { return TransformedCollection.transformingCollection(collection, transformer); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collec... |
@Test @Deprecated public void testSynchronizedCollection() { Collection<Object> col = CollectionUtils.synchronizedCollection(new ArrayList<Object>()); assertTrue("Returned object should be a SynchronizedCollection.", col instanceof SynchronizedCollection); try { CollectionUtils.synchronizedCollection(null); fail("Expec... | @Deprecated public static <C> Collection<C> synchronizedCollection(final Collection<C> collection) { return SynchronizedCollection.synchronizedCollection(collection); } | CollectionUtils { @Deprecated public static <C> Collection<C> synchronizedCollection(final Collection<C> collection) { return SynchronizedCollection.synchronizedCollection(collection); } } | CollectionUtils { @Deprecated public static <C> Collection<C> synchronizedCollection(final Collection<C> collection) { return SynchronizedCollection.synchronizedCollection(collection); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <C> Collection<C> synchronizedCollection(final Collection<C> collection) { return SynchronizedCollection.synchronizedCollection(collection); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> e... | CollectionUtils { @Deprecated public static <C> Collection<C> synchronizedCollection(final Collection<C> collection) { return SynchronizedCollection.synchronizedCollection(collection); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> e... |
@Test @Deprecated public void testUnmodifiableCollection() { Collection<Object> col = CollectionUtils.unmodifiableCollection(new ArrayList<Object>()); assertTrue("Returned object should be a UnmodifiableCollection.", col instanceof UnmodifiableCollection); try { CollectionUtils.unmodifiableCollection(null); fail("Expec... | @Deprecated public static <C> Collection<C> unmodifiableCollection(final Collection<? extends C> collection) { return UnmodifiableCollection.unmodifiableCollection(collection); } | CollectionUtils { @Deprecated public static <C> Collection<C> unmodifiableCollection(final Collection<? extends C> collection) { return UnmodifiableCollection.unmodifiableCollection(collection); } } | CollectionUtils { @Deprecated public static <C> Collection<C> unmodifiableCollection(final Collection<? extends C> collection) { return UnmodifiableCollection.unmodifiableCollection(collection); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <C> Collection<C> unmodifiableCollection(final Collection<? extends C> collection) { return UnmodifiableCollection.unmodifiableCollection(collection); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Colle... | CollectionUtils { @Deprecated public static <C> Collection<C> unmodifiableCollection(final Collection<? extends C> collection) { return UnmodifiableCollection.unmodifiableCollection(collection); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Colle... |
@Test public void emptyCollection() throws Exception { final Collection<Number> coll = CollectionUtils.emptyCollection(); assertEquals(CollectionUtils.EMPTY_COLLECTION, coll); } | @SuppressWarnings("unchecked") public static <T> Collection<T> emptyCollection() { return EMPTY_COLLECTION; } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyCollection() { return EMPTY_COLLECTION; } } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyCollection() { return EMPTY_COLLECTION; } private CollectionUtils(); } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyCollection() { return EMPTY_COLLECTION; } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, emp... | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyCollection() { return EMPTY_COLLECTION; } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unchecked") // OK, emp... |
@Test public void emptyIfNull() { assertTrue(CollectionUtils.emptyIfNull(null).isEmpty()); final Collection<Object> collection = new ArrayList<Object>(); assertSame(collection, CollectionUtils.emptyIfNull(collection)); } | @SuppressWarnings("unchecked") public static <T> Collection<T> emptyIfNull(final Collection<T> collection) { return collection == null ? EMPTY_COLLECTION : collection; } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyIfNull(final Collection<T> collection) { return collection == null ? EMPTY_COLLECTION : collection; } } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyIfNull(final Collection<T> collection) { return collection == null ? EMPTY_COLLECTION : collection; } private CollectionUtils(); } | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyIfNull(final Collection<T> collection) { return collection == null ? EMPTY_COLLECTION : collection; } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> ... | CollectionUtils { @SuppressWarnings("unchecked") public static <T> Collection<T> emptyIfNull(final Collection<T> collection) { return collection == null ? EMPTY_COLLECTION : collection; } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> ... |
@Test public void addAllForIterable() { final Collection<Integer> inputCollection = createMock(Collection.class); final Iterable<Integer> inputIterable = inputCollection; final Iterable<Long> iterable = createMock(Iterable.class); final Iterator<Long> iterator = createMock(Iterator.class); final Collection<Number> c = ... | public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... |
@Test public void testQueryInCount() throws Exception { TypeToken<List<Integer>> pt = new TypeToken<List<Integer>>() { }; TypeToken<Integer> rt = new TypeToken<Integer>() { }; String srcSql = "select count(1) from user where id in (:1)"; AbstractOperator operator = getOperator(pt, rt, srcSql, new ArrayList<Annotation>(... | @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... |
@Test public void addAllForEnumeration() { final Hashtable<Integer, Integer> h = new Hashtable<Integer, Integer>(); h.put(5, 5); final Enumeration<? extends Integer> enumeration = h.keys(); CollectionUtils.addAll(collectionA, enumeration); assertTrue(collectionA.contains(5)); } | public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... |
@Test public void addAllForElements() { CollectionUtils.addAll(collectionA, new Integer[]{5}); assertTrue(collectionA.contains(5)); } | public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); } | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... | CollectionUtils { public static <C> boolean addAll(final Collection<C> collection, final Iterable<? extends C> iterable) { if (iterable instanceof Collection<?>) { return collection.addAll((Collection<? extends C>) iterable); } return addAll(collection, iterable.iterator()); } private CollectionUtils(); @SuppressWarni... |
@Test(expected=IndexOutOfBoundsException.class) public void getNegative() { CollectionUtils.get((Object)collectionA, -3); } | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test(expected=IndexOutOfBoundsException.class) public void getPositiveOutOfBounds() { CollectionUtils.get((Object)collectionA.iterator(), 30); } | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test(expected=IllegalArgumentException.class) public void get1() { CollectionUtils.get((Object)null, 0); } | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test public void get() { assertEquals(2, CollectionUtils.get((Object)collectionA, 2)); assertEquals(2, CollectionUtils.get((Object)collectionA.iterator(), 2)); final Map<Integer, Integer> map = CollectionUtils.getCardinalityMap(collectionA); assertEquals(map.entrySet().iterator().next(), CollectionUtils.get((Object)ma... | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test public void getIterator() { final Iterator<Integer> it = collectionA.iterator(); assertEquals(Integer.valueOf(2), CollectionUtils.get((Object) it, 2)); assertTrue(it.hasNext()); assertEquals(Integer.valueOf(4), CollectionUtils.get((Object) it, 6)); assertFalse(it.hasNext()); } | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test public void getEnumeration() { final Vector<Integer> vectorA = new Vector<Integer>(collectionA); final Enumeration<Integer> e = vectorA.elements(); assertEquals(Integer.valueOf(2), CollectionUtils.get(e, 2)); assertTrue(e.hasMoreElements()); assertEquals(Integer.valueOf(4), CollectionUtils.get(e, 6)); assertFalse... | @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... | CollectionUtils { @Deprecated public static <T> T get(final Iterator<T> iterator, final int index) { return IteratorUtils.get(iterator, index); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type static Collection<T> emptyCollection(); @SuppressWarnings("unch... |
@Test public void extractSingleton() { ArrayList<String> coll = null; try { CollectionUtils.extractSingleton(coll); fail("expected NullPointerException from extractSingleton(null)"); } catch (final NullPointerException e) { } coll = new ArrayList<String>(); try { CollectionUtils.extractSingleton(coll); fail("expected I... | public static <E> E extractSingleton(final Collection<E> collection) { if (collection == null) { throw new NullPointerException("Collection must not be null."); } if (collection.size() != 1) { throw new IllegalArgumentException("Can extract singleton only when collection size == 1"); } return collection.iterator().next... | CollectionUtils { public static <E> E extractSingleton(final Collection<E> collection) { if (collection == null) { throw new NullPointerException("Collection must not be null."); } if (collection.size() != 1) { throw new IllegalArgumentException("Can extract singleton only when collection size == 1"); } return collecti... | CollectionUtils { public static <E> E extractSingleton(final Collection<E> collection) { if (collection == null) { throw new NullPointerException("Collection must not be null."); } if (collection.size() != 1) { throw new IllegalArgumentException("Can extract singleton only when collection size == 1"); } return collecti... | CollectionUtils { public static <E> E extractSingleton(final Collection<E> collection) { if (collection == null) { throw new NullPointerException("Collection must not be null."); } if (collection.size() != 1) { throw new IllegalArgumentException("Can extract singleton only when collection size == 1"); } return collecti... | CollectionUtils { public static <E> E extractSingleton(final Collection<E> collection) { if (collection == null) { throw new NullPointerException("Collection must not be null."); } if (collection.size() != 1) { throw new IllegalArgumentException("Can extract singleton only when collection size == 1"); } return collecti... |
@Test(expected=NullPointerException.class) public void collateException1() { CollectionUtils.collate(collectionA, null); } | public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... |
@Test public void testStatsCounter() throws Exception { TypeToken<User> t = TypeToken.of(User.class); String srcSql = "select * from user where id=:1.id and name=:1.name"; AbstractOperator operator = getOperator(t, t, srcSql, new ArrayList<Annotation>()); User user = new User(); user.setId(100); user.setName("ash"); op... | @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); } | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... | QueryOperator extends AbstractOperator { @Override public Object execute(Object[] values, InvocationStat stat) { InvocationContext context = invocationContextFactory.newInvocationContext(values); return execute(context, stat); } QueryOperator(ASTRootNode rootNode, MethodDescriptor md, Config config); @Override Object e... |
@Test(expected=NullPointerException.class) public void collateException2() { CollectionUtils.collate(collectionA, collectionC, null); } | public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... |
@Test public void testCollate() { List<Integer> result = CollectionUtils.collate(emptyCollection, emptyCollection); assertEquals("Merge empty with empty", 0, result.size()); result = CollectionUtils.collate(collectionA, emptyCollection); assertEquals("Merge empty with non-empty", collectionA, result); List<Integer> res... | public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); } | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... | CollectionUtils { public static <O extends Comparable<? super O>> List<O> collate(Iterable<? extends O> a, Iterable<? extends O> b) { return collate(a, b, ComparatorUtils.<O>naturalComparator(), true); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any type stati... |
@Test(expected=NullPointerException.class) public void testPermutationsWithNullCollection() { CollectionUtils.permutations(null); } | public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } } | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... |
@Test public void testPermutations() { List<Integer> sample = collectionA.subList(0, 5); Collection<List<Integer>> permutations = CollectionUtils.permutations(sample); int collSize = sample.size(); int factorial = 1; for (int i = 1; i <= collSize; i++) { factorial *= i; } assertEquals(factorial, permutations.size()); } | public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } } | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... | CollectionUtils { public static <E> Collection<List<E>> permutations(final Collection<E> collection) { final PermutationIterator<E> it = new PermutationIterator<E>(collection); final Collection<List<E>> result = new LinkedList<List<E>>(); while (it.hasNext()) { result.add(it.next()); } return result; } private Collect... |
@Test @Deprecated public void testMatchesAll() { assertFalse(CollectionUtils.matchesAll(null, null)); assertFalse(CollectionUtils.matchesAll(collectionA, null)); Predicate<Integer> lessThanFive = new Predicate<Integer>() { @Override public boolean evaluate(Integer object) { return object < 5; } }; assertTrue(Collection... | @Deprecated public static <C> boolean matchesAll(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAll(input, predicate); } | CollectionUtils { @Deprecated public static <C> boolean matchesAll(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAll(input, predicate); } } | CollectionUtils { @Deprecated public static <C> boolean matchesAll(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAll(input, predicate); } private CollectionUtils(); } | CollectionUtils { @Deprecated public static <C> boolean matchesAll(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAll(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any t... | CollectionUtils { @Deprecated public static <C> boolean matchesAll(final Iterable<C> input, final Predicate<? super C> predicate) { return predicate == null ? false : IterableUtils.matchesAll(input, predicate); } private CollectionUtils(); @SuppressWarnings("unchecked") // OK, empty collection is compatible with any t... |
@Test public void mapGet() { Map<Integer, Number> map = lazySortedMap(new TreeMap<Integer,Number>(), oneFactory); assertEquals(0, map.size()); final Number i1 = map.get(5); assertEquals(1, i1); assertEquals(1, map.size()); map = lazySortedMap(new TreeMap<Integer,Number>(), FactoryUtils.<Number>nullFactory()); final Num... | public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) { return new LazySortedMap<K,V>(map, factory); } | LazySortedMap extends LazyMap<K,V> implements SortedMap<K,V> { public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) { return new LazySortedMap<K,V>(map, factory); } } | LazySortedMap extends LazyMap<K,V> implements SortedMap<K,V> { public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) { return new LazySortedMap<K,V>(map, factory); } protected LazySortedMap(final SortedMap<K,V> map, final Factory<? extends V> factory); pr... | LazySortedMap extends LazyMap<K,V> implements SortedMap<K,V> { public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) { return new LazySortedMap<K,V>(map, factory); } protected LazySortedMap(final SortedMap<K,V> map, final Factory<? extends V> factory); pr... | LazySortedMap extends LazyMap<K,V> implements SortedMap<K,V> { public static <K, V> LazySortedMap<K, V> lazySortedMap(final SortedMap<K, V> map, final Factory<? extends V> factory) { return new LazySortedMap<K,V>(map, factory); } protected LazySortedMap(final SortedMap<K,V> map, final Factory<? extends V> factory); pr... |
@Test public void testExceptionTransformer() { assertNotNull(TransformerUtils.exceptionTransformer()); assertSame(TransformerUtils.exceptionTransformer(), TransformerUtils.exceptionTransformer()); try { TransformerUtils.exceptionTransformer().transform(null); } catch (final FunctorException ex) { try { TransformerUtils... | public static <I, O> Transformer<I, O> exceptionTransformer() { return ExceptionTransformer.exceptionTransformer(); } | TransformerUtils { public static <I, O> Transformer<I, O> exceptionTransformer() { return ExceptionTransformer.exceptionTransformer(); } } | TransformerUtils { public static <I, O> Transformer<I, O> exceptionTransformer() { return ExceptionTransformer.exceptionTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> exceptionTransformer() { return ExceptionTransformer.exceptionTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer... | TransformerUtils { public static <I, O> Transformer<I, O> exceptionTransformer() { return ExceptionTransformer.exceptionTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer... |
@Test public void testNullTransformer() { assertNotNull(TransformerUtils.nullTransformer()); assertSame(TransformerUtils.nullTransformer(), TransformerUtils.nullTransformer()); assertEquals(null, TransformerUtils.nullTransformer().transform(null)); assertEquals(null, TransformerUtils.nullTransformer().transform(cObject... | public static <I, O> Transformer<I, O> nullTransformer() { return ConstantTransformer.nullTransformer(); } | TransformerUtils { public static <I, O> Transformer<I, O> nullTransformer() { return ConstantTransformer.nullTransformer(); } } | TransformerUtils { public static <I, O> Transformer<I, O> nullTransformer() { return ConstantTransformer.nullTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> nullTransformer() { return ConstantTransformer.nullTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> clon... | TransformerUtils { public static <I, O> Transformer<I, O> nullTransformer() { return ConstantTransformer.nullTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> clon... |
@Test public void testNopTransformer() { assertNotNull(TransformerUtils.nullTransformer()); assertSame(TransformerUtils.nullTransformer(), TransformerUtils.nullTransformer()); assertEquals(null, TransformerUtils.nopTransformer().transform(null)); assertEquals(cObject, TransformerUtils.nopTransformer().transform(cObject... | public static <T> Transformer<T, T> nopTransformer() { return NOPTransformer.nopTransformer(); } | TransformerUtils { public static <T> Transformer<T, T> nopTransformer() { return NOPTransformer.nopTransformer(); } } | TransformerUtils { public static <T> Transformer<T, T> nopTransformer() { return NOPTransformer.nopTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> nopTransformer() { return NOPTransformer.nopTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> cloneTransform... | TransformerUtils { public static <T> Transformer<T, T> nopTransformer() { return NOPTransformer.nopTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> cloneTransform... |
@Test public void testConstantTransformer() { assertEquals(cObject, TransformerUtils.constantTransformer(cObject).transform(null)); assertEquals(cObject, TransformerUtils.constantTransformer(cObject).transform(cObject)); assertEquals(cObject, TransformerUtils.constantTransformer(cObject).transform(cString)); assertEqua... | public static <I, O> Transformer<I, O> constantTransformer(final O constantToReturn) { return ConstantTransformer.constantTransformer(constantToReturn); } | TransformerUtils { public static <I, O> Transformer<I, O> constantTransformer(final O constantToReturn) { return ConstantTransformer.constantTransformer(constantToReturn); } } | TransformerUtils { public static <I, O> Transformer<I, O> constantTransformer(final O constantToReturn) { return ConstantTransformer.constantTransformer(constantToReturn); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> constantTransformer(final O constantToReturn) { return ConstantTransformer.constantTransformer(constantToReturn); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T>... | TransformerUtils { public static <I, O> Transformer<I, O> constantTransformer(final O constantToReturn) { return ConstantTransformer.constantTransformer(constantToReturn); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T>... |
@Test public void testGet() throws Exception { Ticker4Test t = new Ticker4Test(); LocalCacheHandler cache = new LocalCacheHandler(t); int seconds = 100; String key = "key"; String value = "value"; cache.set(key, value, seconds); assertThat((String) cache.get(key), equalTo(value)); t.addSeconds(seconds + 1); assertThat(... | public Object get(String key) { return get(key, null); } | LocalCacheHandler extends SimpleCacheHandler { public Object get(String key) { return get(key, null); } } | LocalCacheHandler extends SimpleCacheHandler { public Object get(String key) { return get(key, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); } | LocalCacheHandler extends SimpleCacheHandler { public Object get(String key) { return get(key, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<String, Object> getBulk(Set<St... | LocalCacheHandler extends SimpleCacheHandler { public Object get(String key) { return get(key, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<String, Object> getBulk(Set<St... |
@Test public void testCloneTransformer() { assertEquals(null, TransformerUtils.cloneTransformer().transform(null)); assertEquals(cString, TransformerUtils.cloneTransformer().transform(cString)); assertEquals(cInteger, TransformerUtils.cloneTransformer().transform(cInteger)); try { assertEquals(cObject, TransformerUtils... | public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); } | TransformerUtils { public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); } } | TransformerUtils { public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> cloneTra... | TransformerUtils { public static <T> Transformer<T, T> cloneTransformer() { return CloneTransformer.cloneTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Transformer<T, T> cloneTra... |
@Test @SuppressWarnings("boxing") public void testMapTransformer() { final Map<Object, Integer> map = new HashMap<Object, Integer>(); map.put(null, 0); map.put(cObject, 1); map.put(cString, 2); assertEquals(Integer.valueOf(0), TransformerUtils.mapTransformer(map).transform(null)); assertEquals(Integer.valueOf(1), Trans... | public static <I, O> Transformer<I, O> mapTransformer(final Map<? super I, ? extends O> map) { return MapTransformer.mapTransformer(map); } | TransformerUtils { public static <I, O> Transformer<I, O> mapTransformer(final Map<? super I, ? extends O> map) { return MapTransformer.mapTransformer(map); } } | TransformerUtils { public static <I, O> Transformer<I, O> mapTransformer(final Map<? super I, ? extends O> map) { return MapTransformer.mapTransformer(map); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> mapTransformer(final Map<? super I, ? extends O> map) { return MapTransformer.mapTransformer(map); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer... | TransformerUtils { public static <I, O> Transformer<I, O> mapTransformer(final Map<? super I, ? extends O> map) { return MapTransformer.mapTransformer(map); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer... |
@Test public void testExecutorTransformer() { assertEquals(null, TransformerUtils.asTransformer(ClosureUtils.nopClosure()).transform(null)); assertEquals(cObject, TransformerUtils.asTransformer(ClosureUtils.nopClosure()).transform(cObject)); assertEquals(cString, TransformerUtils.asTransformer(ClosureUtils.nopClosure()... | public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... |
@Test public void testPredicateTransformer() { assertEquals(Boolean.TRUE, TransformerUtils.asTransformer(TruePredicate.truePredicate()).transform(null)); assertEquals(Boolean.TRUE, TransformerUtils.asTransformer(TruePredicate.truePredicate()).transform(cObject)); assertEquals(Boolean.TRUE, TransformerUtils.asTransforme... | public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... |
@Test public void testFactoryTransformer() { assertEquals(null, TransformerUtils.asTransformer(FactoryUtils.nullFactory()).transform(null)); assertEquals(null, TransformerUtils.asTransformer(FactoryUtils.nullFactory()).transform(cObject)); assertEquals(null, TransformerUtils.asTransformer(FactoryUtils.nullFactory()).tr... | public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... | TransformerUtils { public static <T> Transformer<T, T> asTransformer(final Closure<? super T> closure) { return ClosureTransformer.closureTransformer(closure); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransfor... |
@Test @SuppressWarnings("unchecked") public void testChainedTransformer() { final Transformer<Object, Object> a = TransformerUtils.<Object, Object>constantTransformer("A"); final Transformer<Object, Object> b = TransformerUtils.constantTransformer((Object) "B"); assertEquals("A", TransformerUtils.chainedTransformer(b, ... | public static <T> Transformer<T, T> chainedTransformer( final Transformer<? super T, ? extends T>... transformers) { return ChainedTransformer.chainedTransformer(transformers); } | TransformerUtils { public static <T> Transformer<T, T> chainedTransformer( final Transformer<? super T, ? extends T>... transformers) { return ChainedTransformer.chainedTransformer(transformers); } } | TransformerUtils { public static <T> Transformer<T, T> chainedTransformer( final Transformer<? super T, ? extends T>... transformers) { return ChainedTransformer.chainedTransformer(transformers); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> chainedTransformer( final Transformer<? super T, ? extends T>... transformers) { return ChainedTransformer.chainedTransformer(transformers); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); ... | TransformerUtils { public static <T> Transformer<T, T> chainedTransformer( final Transformer<? super T, ? extends T>... transformers) { return ChainedTransformer.chainedTransformer(transformers); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); ... |
@Test public void testIfTransformer() { final Transformer<Object, String> a = TransformerUtils.constantTransformer("A"); final Transformer<Object, String> b = TransformerUtils.constantTransformer("B"); final Transformer<Object, String> c = TransformerUtils.constantTransformer("C"); assertEquals("A", TransformerUtils.if... | public static <T> Transformer<T, T> ifTransformer(final Predicate<? super T> predicate, final Transformer<? super T, ? extends T> trueTransformer) { return IfTransformer.ifTransformer(predicate, trueTransformer); } | TransformerUtils { public static <T> Transformer<T, T> ifTransformer(final Predicate<? super T> predicate, final Transformer<? super T, ? extends T> trueTransformer) { return IfTransformer.ifTransformer(predicate, trueTransformer); } } | TransformerUtils { public static <T> Transformer<T, T> ifTransformer(final Predicate<? super T> predicate, final Transformer<? super T, ? extends T> trueTransformer) { return IfTransformer.ifTransformer(predicate, trueTransformer); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, T> ifTransformer(final Predicate<? super T> predicate, final Transformer<? super T, ? extends T> trueTransformer) { return IfTransformer.ifTransformer(predicate, trueTransformer); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static T... | TransformerUtils { public static <T> Transformer<T, T> ifTransformer(final Predicate<? super T> predicate, final Transformer<? super T, ? extends T> trueTransformer) { return IfTransformer.ifTransformer(predicate, trueTransformer); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static T... |
@Test @SuppressWarnings("unchecked") public void testSwitchTransformer() { final Transformer<String, String> a = TransformerUtils.constantTransformer("A"); final Transformer<String, String> b = TransformerUtils.constantTransformer("B"); final Transformer<String, String> c = TransformerUtils.constantTransformer("C"); as... | @SuppressWarnings("unchecked") @Deprecated public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? super I> predicate, final Transformer<? super I, ? extends O> trueTransformer, final Transformer<? super I, ? extends O> falseTransformer) { return SwitchTransformer.switchTransformer(new Predicate[] { ... | TransformerUtils { @SuppressWarnings("unchecked") @Deprecated public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? super I> predicate, final Transformer<? super I, ? extends O> trueTransformer, final Transformer<? super I, ? extends O> falseTransformer) { return SwitchTransformer.switchTransformer... | TransformerUtils { @SuppressWarnings("unchecked") @Deprecated public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? super I> predicate, final Transformer<? super I, ? extends O> trueTransformer, final Transformer<? super I, ? extends O> falseTransformer) { return SwitchTransformer.switchTransformer... | TransformerUtils { @SuppressWarnings("unchecked") @Deprecated public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? super I> predicate, final Transformer<? super I, ? extends O> trueTransformer, final Transformer<? super I, ? extends O> falseTransformer) { return SwitchTransformer.switchTransformer... | TransformerUtils { @SuppressWarnings("unchecked") @Deprecated public static <I, O> Transformer<I, O> switchTransformer(final Predicate<? super I> predicate, final Transformer<? super I, ? extends O> trueTransformer, final Transformer<? super I, ? extends O> falseTransformer) { return SwitchTransformer.switchTransformer... |
@Test public void testSwitchMapTransformer() { final Transformer<String, String> a = TransformerUtils.constantTransformer("A"); final Transformer<String, String> b = TransformerUtils.constantTransformer("B"); final Transformer<String, String> c = TransformerUtils.constantTransformer("C"); Map<String, Transformer<String... | @SuppressWarnings("unchecked") public static <I, O> Transformer<I, O> switchMapTransformer( final Map<I, Transformer<I, O>> objectsAndTransformers) { if (objectsAndTransformers == null) { throw new NullPointerException("The object and transformer map must not be null"); } final Transformer<? super I, ? extends O> def =... | TransformerUtils { @SuppressWarnings("unchecked") public static <I, O> Transformer<I, O> switchMapTransformer( final Map<I, Transformer<I, O>> objectsAndTransformers) { if (objectsAndTransformers == null) { throw new NullPointerException("The object and transformer map must not be null"); } final Transformer<? super I,... | TransformerUtils { @SuppressWarnings("unchecked") public static <I, O> Transformer<I, O> switchMapTransformer( final Map<I, Transformer<I, O>> objectsAndTransformers) { if (objectsAndTransformers == null) { throw new NullPointerException("The object and transformer map must not be null"); } final Transformer<? super I,... | TransformerUtils { @SuppressWarnings("unchecked") public static <I, O> Transformer<I, O> switchMapTransformer( final Map<I, Transformer<I, O>> objectsAndTransformers) { if (objectsAndTransformers == null) { throw new NullPointerException("The object and transformer map must not be null"); } final Transformer<? super I,... | TransformerUtils { @SuppressWarnings("unchecked") public static <I, O> Transformer<I, O> switchMapTransformer( final Map<I, Transformer<I, O>> objectsAndTransformers) { if (objectsAndTransformers == null) { throw new NullPointerException("The object and transformer map must not be null"); } final Transformer<? super I,... |
@Test public void testInvokerTransformer() { final List<Object> list = new ArrayList<Object>(); assertEquals(Integer.valueOf(0), TransformerUtils.invokerTransformer("size").transform(list)); list.add(new Object()); assertEquals(Integer.valueOf(1), TransformerUtils.invokerTransformer("size").transform(list)); assertEqua... | public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, ... | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, ... |
@Test public void testGetBulk() throws Exception { Ticker4Test t = new Ticker4Test(); LocalCacheHandler cache = new LocalCacheHandler(t); int seconds = 100; String key = "key"; String value = "value"; int seconds2 = 200; String key2 = "key2"; String value2 = "value2"; cache.set(key, value, seconds); cache.set(key2, val... | public Map<String, Object> getBulk(Set<String> keys) { return getBulk(keys, null); } | LocalCacheHandler extends SimpleCacheHandler { public Map<String, Object> getBulk(Set<String> keys) { return getBulk(keys, null); } } | LocalCacheHandler extends SimpleCacheHandler { public Map<String, Object> getBulk(Set<String> keys) { return getBulk(keys, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); } | LocalCacheHandler extends SimpleCacheHandler { public Map<String, Object> getBulk(Set<String> keys) { return getBulk(keys, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<St... | LocalCacheHandler extends SimpleCacheHandler { public Map<String, Object> getBulk(Set<String> keys) { return getBulk(keys, null); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<St... |
@Test public void testInvokerTransformer2() { final List<Object> list = new ArrayList<Object>(); assertEquals(Boolean.FALSE, TransformerUtils.invokerTransformer("contains", new Class[] { Object.class }, new Object[] { cString }).transform(list)); list.add(cString); assertEquals(Boolean.TRUE, TransformerUtils.invokerTra... | public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); } | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, ... | TransformerUtils { public static <I, O> Transformer<I, O> invokerTransformer(final String methodName) { return InvokerTransformer.invokerTransformer(methodName, null, null); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, ... |
@Test public void testStringValueTransformer() { assertNotNull( "StringValueTransformer should NEVER return a null value.", TransformerUtils.stringValueTransformer().transform(null)); assertEquals( "StringValueTransformer should return \"null\" when given a null argument.", "null", TransformerUtils.stringValueTransform... | public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Tra... | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Tra... |
@Test public void testInstantiateTransformerNull() { try { TransformerUtils.instantiateTransformer(null, new Object[] { "str" }); fail(); } catch (final IllegalArgumentException ex) {} try { TransformerUtils.instantiateTransformer(new Class[] {}, new Object[] { "str" }); fail(); } catch (final IllegalArgumentException ... | public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { return InstantiateTransformer.instantiateTransformer(); } | TransformerUtils { public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { return InstantiateTransformer.instantiateTransformer(); } } | TransformerUtils { public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { return InstantiateTransformer.instantiateTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { return InstantiateTransformer.instantiateTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer()... | TransformerUtils { public static <T> Transformer<Class<? extends T>, T> instantiateTransformer() { return InstantiateTransformer.instantiateTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer()... |
@Test public void testSingletonPatternInSerialization() { final Object[] singletones = new Object[] { ExceptionTransformer.INSTANCE, NOPTransformer.INSTANCE, StringValueTransformer.stringValueTransformer(), }; for (final Object original : singletones) { TestUtils.assertSameAfterSerialization("Singleton pattern broken f... | public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); } | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Tra... | TransformerUtils { public static <T> Transformer<T, String> stringValueTransformer() { return StringValueTransformer.stringValueTransformer(); } private TransformerUtils(); static Transformer<I, O> exceptionTransformer(); static Transformer<I, O> nullTransformer(); static Transformer<T, T> nopTransformer(); static Tra... |
@Test public void testExceptionPredicate() { assertNotNull(PredicateUtils.exceptionPredicate()); assertSame(PredicateUtils.exceptionPredicate(), PredicateUtils.exceptionPredicate()); try { PredicateUtils.exceptionPredicate().evaluate(null); } catch (final FunctorException ex) { try { PredicateUtils.exceptionPredicate()... | public static <T> Predicate<T> exceptionPredicate() { return ExceptionPredicate.exceptionPredicate(); } | PredicateUtils { public static <T> Predicate<T> exceptionPredicate() { return ExceptionPredicate.exceptionPredicate(); } } | PredicateUtils { public static <T> Predicate<T> exceptionPredicate() { return ExceptionPredicate.exceptionPredicate(); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> exceptionPredicate() { return ExceptionPredicate.exceptionPredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T... | PredicateUtils { public static <T> Predicate<T> exceptionPredicate() { return ExceptionPredicate.exceptionPredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T... |
@Test public void testIsNotNullPredicate() { assertNotNull(PredicateUtils.notNullPredicate()); assertSame(PredicateUtils.notNullPredicate(), PredicateUtils.notNullPredicate()); assertEquals(false, PredicateUtils.notNullPredicate().evaluate(null)); assertEquals(true, PredicateUtils.notNullPredicate().evaluate(cObject));... | public static <T> Predicate<T> notNullPredicate() { return NotNullPredicate.notNullPredicate(); } | PredicateUtils { public static <T> Predicate<T> notNullPredicate() { return NotNullPredicate.notNullPredicate(); } } | PredicateUtils { public static <T> Predicate<T> notNullPredicate() { return NotNullPredicate.notNullPredicate(); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> notNullPredicate() { return NotNullPredicate.notNullPredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notN... | PredicateUtils { public static <T> Predicate<T> notNullPredicate() { return NotNullPredicate.notNullPredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notN... |
@Test public void testIdentityPredicate() { assertSame(nullPredicate(), PredicateUtils.identityPredicate(null)); assertNotNull(PredicateUtils.identityPredicate(Integer.valueOf(6))); assertEquals(false, PredicateUtils.identityPredicate(Integer.valueOf(6)).evaluate(null)); assertEquals(false, PredicateUtils.<Object>ident... | public static <T> Predicate<T> identityPredicate(final T value) { return IdentityPredicate.identityPredicate(value); } | PredicateUtils { public static <T> Predicate<T> identityPredicate(final T value) { return IdentityPredicate.identityPredicate(value); } } | PredicateUtils { public static <T> Predicate<T> identityPredicate(final T value) { return IdentityPredicate.identityPredicate(value); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> identityPredicate(final T value) { return IdentityPredicate.identityPredicate(value); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); sta... | PredicateUtils { public static <T> Predicate<T> identityPredicate(final T value) { return IdentityPredicate.identityPredicate(value); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); sta... |
@Test public void testTruePredicate() { assertNotNull(TruePredicate.truePredicate()); assertSame(TruePredicate.truePredicate(), TruePredicate.truePredicate()); assertEquals(true, TruePredicate.truePredicate().evaluate(null)); assertEquals(true, TruePredicate.truePredicate().evaluate(cObject)); assertEquals(true, TruePr... | public static <T> Predicate<T> truePredicate() { return TruePredicate.truePredicate(); } | PredicateUtils { public static <T> Predicate<T> truePredicate() { return TruePredicate.truePredicate(); } } | PredicateUtils { public static <T> Predicate<T> truePredicate() { return TruePredicate.truePredicate(); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> truePredicate() { return TruePredicate.truePredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notNullPredic... | PredicateUtils { public static <T> Predicate<T> truePredicate() { return TruePredicate.truePredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notNullPredic... |
@Test public void testFalsePredicate() { assertNotNull(FalsePredicate.falsePredicate()); assertSame(FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()); assertEquals(false, FalsePredicate.falsePredicate().evaluate(null)); assertEquals(false, FalsePredicate.falsePredicate().evaluate(cObject)); assertEquals... | public static <T> Predicate<T> falsePredicate() { return FalsePredicate.falsePredicate(); } | PredicateUtils { public static <T> Predicate<T> falsePredicate() { return FalsePredicate.falsePredicate(); } } | PredicateUtils { public static <T> Predicate<T> falsePredicate() { return FalsePredicate.falsePredicate(); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> falsePredicate() { return FalsePredicate.falsePredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notNullPre... | PredicateUtils { public static <T> Predicate<T> falsePredicate() { return FalsePredicate.falsePredicate(); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPredicate(); static Predicate<T> notNullPre... |
@Test public void testNotPredicate() { assertNotNull(PredicateUtils.notPredicate(TruePredicate.truePredicate())); assertEquals(false, PredicateUtils.notPredicate(TruePredicate.truePredicate()).evaluate(null)); assertEquals(false, PredicateUtils.notPredicate(TruePredicate.truePredicate()).evaluate(cObject)); assertEqual... | public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPred... | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPred... |
@Test public void testDelete() throws Exception { Ticker4Test t = new Ticker4Test(); LocalCacheHandler cache = new LocalCacheHandler(t); int seconds = 100; String key = "key"; String value = "value"; cache.set(key, value, seconds); assertThat((String) cache.get(key), equalTo(value)); cache.delete(key); assertThat(cache... | @Override public void delete(String key) { cache.remove(key); } | LocalCacheHandler extends SimpleCacheHandler { @Override public void delete(String key) { cache.remove(key); } } | LocalCacheHandler extends SimpleCacheHandler { @Override public void delete(String key) { cache.remove(key); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); } | LocalCacheHandler extends SimpleCacheHandler { @Override public void delete(String key) { cache.remove(key); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<String, Object> getBulk... | LocalCacheHandler extends SimpleCacheHandler { @Override public void delete(String key) { cache.remove(key); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Object get(String key); Map<String, Object> getBulk(Set<String> keys); @Override Object get(String key, Type type); @Override Map<String, Object> getBulk... |
@Test(expected=NullPointerException.class) public void testNotPredicateEx() { PredicateUtils.notPredicate(null); } | public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPred... | PredicateUtils { public static <T> Predicate<T> notPredicate(final Predicate<? super T> predicate) { return NotPredicate.notPredicate(predicate); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nullPred... |
@Test public void testAndPredicate() { assertEquals(true, PredicateUtils.andPredicate(TruePredicate.truePredicate(), TruePredicate.truePredicate()).evaluate(null)); assertEquals(false, PredicateUtils.andPredicate(TruePredicate.truePredicate(), FalsePredicate.falsePredicate()).evaluate(null)); assertEquals(false, Predic... | public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predic... | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predic... |
@Test(expected=NullPointerException.class) public void testAndPredicateEx() { PredicateUtils.andPredicate(null, null); } | public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predic... | PredicateUtils { public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return AndPredicate.andPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predic... |
@SuppressWarnings("unchecked") @Test public void testAllPredicate() { assertTrue(AllPredicate.allPredicate(new Predicate[] {}), null); assertEquals(true, AllPredicate.allPredicate(new Predicate[] { TruePredicate.truePredicate(), TruePredicate.truePredicate(), TruePredicate.truePredicate()}).evaluate(null)); assertEqual... | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test(expected=NullPointerException.class) public void testAllPredicateEx1() { AllPredicate.allPredicate((Predicate<Object>[]) null); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@SuppressWarnings("unchecked") @Test(expected=NullPointerException.class) public void testAllPredicateEx2() { AllPredicate.<Object>allPredicate(new Predicate[] { null }); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@SuppressWarnings("unchecked") @Test(expected=NullPointerException.class) public void testAllPredicateEx3() { AllPredicate.allPredicate(new Predicate[] { null, null }); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test(expected=NullPointerException.class) public void testAllPredicateEx4() { AllPredicate.allPredicate((Collection<Predicate<Object>>) null); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test public void testAllPredicateEx5() { AllPredicate.allPredicate(Collections.<Predicate<Object>>emptyList()); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test(expected=NullPointerException.class) public void testAllPredicateEx6() { final Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>(); coll.add(null); coll.add(null); AllPredicate.allPredicate(coll); } | public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> allPredicate(final Predicate<? super T>... predicates) { return AllPredicate.allPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test public void testAdd() throws Exception { Ticker4Test t = new Ticker4Test(); LocalCacheHandler cache = new LocalCacheHandler(t); int seconds = 100; String key = "key"; String value = "value"; int seconds2 = 200; String key2 = "key2"; String value2 = "value2"; cache.set(key, value, seconds); cache.add(key, value2, ... | @Override public void add(String key, Object value, int exptimeSeconds) { long now = ticker.read(); Entry entry = new Entry(value, now + TimeUnit.SECONDS.toNanos(exptimeSeconds)); cache.putIfAbsent(key, entry); } | LocalCacheHandler extends SimpleCacheHandler { @Override public void add(String key, Object value, int exptimeSeconds) { long now = ticker.read(); Entry entry = new Entry(value, now + TimeUnit.SECONDS.toNanos(exptimeSeconds)); cache.putIfAbsent(key, entry); } } | LocalCacheHandler extends SimpleCacheHandler { @Override public void add(String key, Object value, int exptimeSeconds) { long now = ticker.read(); Entry entry = new Entry(value, now + TimeUnit.SECONDS.toNanos(exptimeSeconds)); cache.putIfAbsent(key, entry); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); } | LocalCacheHandler extends SimpleCacheHandler { @Override public void add(String key, Object value, int exptimeSeconds) { long now = ticker.read(); Entry entry = new Entry(value, now + TimeUnit.SECONDS.toNanos(exptimeSeconds)); cache.putIfAbsent(key, entry); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Obje... | LocalCacheHandler extends SimpleCacheHandler { @Override public void add(String key, Object value, int exptimeSeconds) { long now = ticker.read(); Entry entry = new Entry(value, now + TimeUnit.SECONDS.toNanos(exptimeSeconds)); cache.putIfAbsent(key, entry); } LocalCacheHandler(); LocalCacheHandler(Ticker ticker); Obje... |
@Test public void testOrPredicate() { assertEquals(true, PredicateUtils.orPredicate(TruePredicate.truePredicate(), TruePredicate.truePredicate()).evaluate(null)); assertEquals(true, PredicateUtils.orPredicate(TruePredicate.truePredicate(), FalsePredicate.falsePredicate()).evaluate(null)); assertEquals(true, PredicateUt... | public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate... | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate... |
@Test(expected=NullPointerException.class) public void testOrPredicateEx() { PredicateUtils.orPredicate(null, null); } | public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate... | PredicateUtils { public static <T> Predicate<T> orPredicate(final Predicate<? super T> predicate1, final Predicate<? super T> predicate2) { return OrPredicate.orPredicate(predicate1, predicate2); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate... |
@SuppressWarnings("unchecked") @Test public void testAnyPredicate() { assertFalse(PredicateUtils.anyPredicate(new Predicate[] {}), null); assertEquals(true, PredicateUtils.anyPredicate(new Predicate[] { TruePredicate.truePredicate(), TruePredicate.truePredicate(), TruePredicate.truePredicate()}).evaluate(null)); assert... | public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@Test(expected=NullPointerException.class) public void testAnyPredicateEx1() { PredicateUtils.anyPredicate((Predicate<Object>[]) null); } | public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
@SuppressWarnings("unchecked") @Test(expected=NullPointerException.class) public void testAnyPredicateEx2() { PredicateUtils.anyPredicate(new Predicate[] {null}); } | public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); } | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... | PredicateUtils { public static <T> Predicate<T> anyPredicate(final Predicate<? super T>... predicates) { return AnyPredicate.anyPredicate(predicates); } private PredicateUtils(); static Predicate<T> exceptionPredicate(); static Predicate<T> truePredicate(); static Predicate<T> falsePredicate(); static Predicate<T> nul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.