Class CollectionUtil


  • public class CollectionUtil
    extends Object
    Author:
    Yvo Swillens
    • Constructor Detail

      • CollectionUtil

        public CollectionUtil()
    • Method Detail

      • allOf

        public static boolean allOf​(Object collection,
                                    Object value)
        all values of value must be in collection
        Returns:
        true if all elements of value are within the collection, false if at least one element of value is not within the collection
      • contains

        @Deprecated
        public static boolean contains​(Object collection,
                                       Object value)
        Deprecated.
        use @{link #allOf(Object, Object)} instead
      • noneOf

        public static boolean noneOf​(Object collection,
                                     Object value)
        none of the values of value must be in collection
        Returns:
        true if all elements of value are not within the collection, false if at least one element of value is within the collection
      • notContains

        @Deprecated
        public static boolean notContains​(Object collection,
                                          Object value)
        Deprecated.
        use @{link #noneOf(Object, Object)} instead
      • anyOf

        public static boolean anyOf​(Object collection,
                                    Object value)
        one of the values of value must be in collection
        Returns:
        true if at least one element of value is within the collection, false if all elements of value are not within the collection
      • containsAny

        @Deprecated
        public static boolean containsAny​(Object collection,
                                          Object value)
        Deprecated.
        use @{link #anyof(Object, Object)} instead
      • notAllOf

        public static boolean notAllOf​(Object collection,
                                       Object value)
        one of the values of value must not be in collection
        Returns:
        true if a least one element of value is not within the collection, false if all elements of value are within the collection