Klasse ObjectLinkedOpenCustomHashSet<T>

Typparameter:
T - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
Iterable<T>, Collection<T>, Set<T>, ObjectCollection<T>, ObjectIterable<T>, ObjectOrderedSet<T>, ObjectSet<T>, ISizeProvider, ITrimmable

public class ObjectLinkedOpenCustomHashSet<T> extends ObjectOpenCustomHashSet<T> implements ObjectOrderedSet<T>
A Type Specific LinkedHashSet that allows for custom HashControl. That uses arrays to create links between nodes. For cases where Objects/primitive do not allow hashcoding this can be really useful and provide a lot of control. This implementation of SortedSet does not support SubSet of any kind. It implements the interface due to sortability and first/last access
  • Konstruktordetails

    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(ObjectStrategy<? super T> strategy)
      Default Contstructor
      Parameter:
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(int minCapacity, ObjectStrategy<? super T> strategy)
      Constructor that defines the minimum capacity
      Parameter:
      minCapacity - the minimum capacity the HashSet is allowed to be.
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the minimum capacity is negative
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(int minCapacity, float loadFactor, ObjectStrategy<? super T> strategy)
      Constructor that defines the minimum capacity and load factor
      Parameter:
      minCapacity - the minimum capacity the HashSet is allowed to be.
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the minimum capacity is negative
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(T[] array, ObjectStrategy<? super T> strategy)
      Helper constructor that allow to create a set from unboxed values
      Parameter:
      array - the elements that should be put into the set
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(T[] array, float loadFactor, ObjectStrategy<? super T> strategy)
      Helper constructor that allow to create a set from unboxed values
      Parameter:
      array - the elements that should be put into the set
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(T[] array, int offset, int length, ObjectStrategy<? super T> strategy)
      Helper constructor that allow to create a set from unboxed values
      Parameter:
      array - the elements that should be put into the set
      offset - the starting index within the array that should be used
      length - the amount of elements used from the array
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if offset and length causes to step outside of the arrays range
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(T[] array, int offset, int length, float loadFactor, ObjectStrategy<? super T> strategy)
      Helper constructor that allow to create a set from unboxed values
      Parameter:
      array - the elements that should be put into the set
      offset - the starting index within the array that should be used
      length - the amount of elements used from the array
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
      IllegalStateException - if offset and length causes to step outside of the arrays range
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(Collection<? extends T> collection, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the Set
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(Collection<? extends T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the Set
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the Set
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(ObjectCollection<T> collection, float loadFactor, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the Set
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(Iterator<T> iterator, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
    • ObjectLinkedOpenCustomHashSet

      public ObjectLinkedOpenCustomHashSet(Iterator<T> iterator, float loadFactor, ObjectStrategy<? super T> strategy)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
      loadFactor - the percentage of how full the backing array can be before they resize
      strategy - the strategy that allows hash control.
      Löst aus:
      NullPointerException - if Strategy is null
      IllegalStateException - if the loadfactor is either below/equal to 0 or above/equal to 1
  • Methodendetails