类 SetUtils


  • public abstract class SetUtils
    extends BaseUtils
    The utilities class for Java Set
    从以下版本开始:
    1.0.0
    作者:
    Mercy
    另请参阅:
    Set
    • 构造器概要

      构造器 
      构造器 说明
      SetUtils()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static boolean isSet​(java.lang.Iterable<?> elements)  
      static <E> java.util.Set<E> newHashSet()  
      static <E> java.util.Set<E> newHashSet​(int initialCapacity)  
      static <E> java.util.Set<E> newHashSet​(int initialCapacity, float loadFactor)  
      static <E> java.util.Set<E> newHashSet​(java.lang.Iterable<E> elements)  
      static <E> java.util.Set<E> newHashSet​(java.util.Collection<? extends E> elements)  
      static <E> java.util.Set<E> newLinkedHashSet()  
      static <E> java.util.Set<E> newLinkedHashSet​(int initialCapacity)  
      static <E> java.util.Set<E> newLinkedHashSet​(int initialCapacity, float loadFactor)  
      static <E> java.util.Set<E> newLinkedHashSet​(java.lang.Iterable<E> elements)  
      static <E> java.util.Set<E> newLinkedHashSet​(java.util.Collection<? extends E> elements)  
      static <E> java.util.Set<E> newLinkedHashSet​(java.util.Iterator<E> elements)  
      static <E> java.util.Set<E> of​(E... elements)
      Convert to multiple elements to be LinkedHashSet
      static <E> java.util.Set<E> ofSet​(E one, E... others)
      Convert to one or more elements to be a read-only Set
      static <E> java.util.Set<E> ofSet​(java.lang.Iterable<E> elements)
      Convert to multiple elements to be LinkedHashSet
      static <T> java.util.Set<T> ofSet​(java.util.Collection<T> elements, T... others)  
      static <E> java.util.Set<E> ofSet​(java.util.Enumeration<E> elements)
      Build a read-only Set from the given elements
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • SetUtils

        public SetUtils()
    • 方法详细资料

      • isSet

        public static boolean isSet​(java.lang.Iterable<?> elements)
      • of

        public static <E> java.util.Set<E> of​(E... elements)
        Convert to multiple elements to be LinkedHashSet
        类型参数:
        E - the type of elements
        参数:
        elements - one or more elements
        返回:
        read-only Set
      • ofSet

        @Nonnull
        public static <E> java.util.Set<E> ofSet​(java.util.Enumeration<E> elements)
        Build a read-only Set from the given elements
        类型参数:
        E - the type of elements
        参数:
        elements - one or more elements
        返回:
        non-null read-only Set
      • ofSet

        public static <E> java.util.Set<E> ofSet​(java.lang.Iterable<E> elements)
        Convert to multiple elements to be LinkedHashSet
        类型参数:
        E - the type of elements
        参数:
        elements - one or more elements
        返回:
        read-only Set
      • ofSet

        public static <E> java.util.Set<E> ofSet​(E one,
                                                 E... others)
        Convert to one or more elements to be a read-only Set
        类型参数:
        E - the type of elements
        参数:
        one - one element
        others - others elements
        返回:
        read-only Set
      • ofSet

        public static <T> java.util.Set<T> ofSet​(java.util.Collection<T> elements,
                                                 T... others)
      • newHashSet

        public static <E> java.util.Set<E> newHashSet​(java.lang.Iterable<E> elements)
      • newHashSet

        public static <E> java.util.Set<E> newHashSet​(java.util.Collection<? extends E> elements)
      • newHashSet

        public static <E> java.util.Set<E> newHashSet()
      • newHashSet

        public static <E> java.util.Set<E> newHashSet​(int initialCapacity)
      • newHashSet

        public static <E> java.util.Set<E> newHashSet​(int initialCapacity,
                                                      float loadFactor)
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet​(java.lang.Iterable<E> elements)
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet​(java.util.Iterator<E> elements)
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet​(java.util.Collection<? extends E> elements)
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet()
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet​(int initialCapacity)
      • newLinkedHashSet

        public static <E> java.util.Set<E> newLinkedHashSet​(int initialCapacity,
                                                            float loadFactor)