java.lang.Object
speiger.src.collections.objects.utils.ObjectSets

public class ObjectSets extends Object
A Helper class for sets
  • Konstruktordetails

    • ObjectSets

      public ObjectSets()
  • Methodendetails

    • empty

      public static <T> ObjectSet<T> empty()
      EmptySet getter
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Gibt zurück:
      a EmptySet
    • synchronize

      public static <T> ObjectSet<T> synchronize(ObjectSet<T> s)
      Creates a Synchronized set while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      Gibt zurück:
      a set that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectSet<T> synchronize(ObjectSet<T> s, Object mutex)
      Creates a Synchronized set while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      mutex - controller for access
      Gibt zurück:
      a set that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectSortedSet<T> synchronize(ObjectSortedSet<T> s)
      Creates a Synchronized SortedSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      Gibt zurück:
      a SortedSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectSortedSet<T> synchronize(ObjectSortedSet<T> s, Object mutex)
      Creates a Synchronized SortedSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      mutex - controller for access
      Gibt zurück:
      a SortedSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectOrderedSet<T> synchronize(ObjectOrderedSet<T> s)
      Creates a Synchronized OrderedSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      Gibt zurück:
      a OrderedSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectOrderedSet<T> synchronize(ObjectOrderedSet<T> s, Object mutex)
      Creates a Synchronized OrderedSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      mutex - controller for access
      Gibt zurück:
      a OrderedSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectNavigableSet<T> synchronize(ObjectNavigableSet<T> s)
      Creates a Synchronized NavigableSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      Gibt zurück:
      a NavigableSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • synchronize

      public static <T> ObjectNavigableSet<T> synchronize(ObjectNavigableSet<T> s, Object mutex)
      Creates a Synchronized NavigableSet while preserving the ITrimmable interface
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - the set that should be synchronized
      mutex - controller for access
      Gibt zurück:
      a NavigableSet that is synchronized
      Note:
      if the set is already synchronized then it will just self return it
    • unmodifiable

      public static <T> ObjectSet<T> unmodifiable(ObjectSet<T> s)
      Creates Unmodifyable Set wrapper
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - set that should be made unmodifiable
      Gibt zurück:
      a UnmodifyableSet, if the set is already unmodifiable then it returns itself
    • unmodifiable

      public static <T> ObjectSortedSet<T> unmodifiable(ObjectSortedSet<T> s)
      Creates Unmodifyable SortedSet wrapper
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - sortedSet that should be made unmodifiable
      Gibt zurück:
      a UnmodifyableSortedSet, if the set is already unmodifiable then it returns itself
    • unmodifiable

      public static <T> ObjectOrderedSet<T> unmodifiable(ObjectOrderedSet<T> s)
      Creates Unmodifyable OrderedSet wrapper
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - OrderedSet that should be made unmodifiable
      Gibt zurück:
      a UnmodifyableOrderedSet, if the set is already unmodifiable then it returns itself
    • unmodifiable

      public static <T> ObjectNavigableSet<T> unmodifiable(ObjectNavigableSet<T> s)
      Creates Unmodifyable NavigableSet wrapper
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      s - navigableSet that should be made unmodifiable
      Gibt zurück:
      a UnmodifyableNavigableSet, if the set is already unmodifiable then it returns itself
    • singleton

      public static <T> ObjectSet<T> singleton(T element)
      Creates a Singleton set of a given element
      Typparameter:
      T - the keyType of elements maintained by this Collection
      Parameter:
      element - the element that should be converted into a singleton set
      Gibt zurück:
      a singletonset of the given element