Klasse DoubleArraySet

Alle implementierten Schnittstellen:
Iterable<Double>, Collection<Double>, Set<Double>, DoubleCollection, DoubleIterable, DoubleOrderedSet, DoubleSet, ISizeProvider

public class DoubleArraySet extends AbstractDoubleSet implements DoubleOrderedSet
A Type Specific ArraySet implementation. That is based around the idea of List.indexOf(Object) for no duplication. Unless a array constructor is used the ArraySet does not allow for duplication. This implementation does not shrink the backing array
  • Konstruktordetails

    • DoubleArraySet

      public DoubleArraySet()
      Default Constructor
    • DoubleArraySet

      public DoubleArraySet(int capacity)
      Minimum Capacity Constructor
      Parameter:
      capacity - the minimum capacity of the internal array
      Löst aus:
      NegativeArraySizeException - if the capacity is negative
    • DoubleArraySet

      public DoubleArraySet(double[] array)
      Constructur using initial Array
      Parameter:
      array - the array that should be used for set.
    • DoubleArraySet

      public DoubleArraySet(double[] array, int length)
      Constructur using initial Array
      Parameter:
      array - the array that should be used for set.
      length - the amount of elements present within the array
      Löst aus:
      NegativeArraySizeException - if the length is negative
    • DoubleArraySet

      @Deprecated public DoubleArraySet(Collection<? extends Double> c)
      Veraltet.
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      c - the elements that should be added to the set.
      Note:
      this slowly checks every element to remove duplicates
    • DoubleArraySet

      public DoubleArraySet(DoubleCollection c)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      c - the elements that should be added to the set.
      Note:
      this slowly checks every element to remove duplicates
    • DoubleArraySet

      @Deprecated public DoubleArraySet(Set<? extends Double> s)
      Veraltet.
      A Helper constructor that fast copies the element out of a set into the ArraySet. Since it is assumed that there is no duplication in the first place
      Parameter:
      s - the set the element should be taken from
    • DoubleArraySet

      public DoubleArraySet(DoubleSet s)
      A Helper constructor that fast copies the element out of a set into the ArraySet. Since it is assumed that there is no duplication in the first place
      Parameter:
      s - the set the element should be taken from
  • Methodendetails