Class BmLongSegmentSyncSet

java.lang.Object
com._1c.g5.v8.bm.common.collections.BmLongSegmentSyncSet
All Implemented Interfaces:
IBmLongSet

public class BmLongSegmentSyncSet extends Object implements IBmLongSet
A Long set with segment synchronization. Implementation limited only for put/get/remove operations. Iterations are not supported.
  • Field Details

    • hashSalt

      protected final long hashSalt
  • Constructor Details

    • BmLongSegmentSyncSet

      public BmLongSegmentSyncSet(int segments)
  • Method Details

    • hashSaltValue

      protected long hashSaltValue()
    • entryIterator

      public Iterable<IBmLongSet.Entry> entryIterator()
      Description copied from interface: IBmLongSet
      Gets entry iterator.
      Specified by:
      entryIterator in interface IBmLongSet
      Returns:
      an entry iterator.
    • iterator

      public IBmLongIterator iterator()
      Description copied from interface: IBmLongSet
      Gets the long value iterator
      Specified by:
      iterator in interface IBmLongSet
      Returns:
      The iterator of values. May not be null
    • clear

      public void clear()
      Description copied from interface: IBmLongSet
      Removes all the elements.
      Specified by:
      clear in interface IBmLongSet
      See Also:
    • getMap

      public IBmLongSet getMap(long key)
    • contains

      public boolean contains(long key)
      Description copied from interface: IBmLongSet
      Checks if the set contains the specified element.
      Specified by:
      contains in interface IBmLongSet
      Parameters:
      key - the element.
      Returns:
      true if set contains the specified element, false otherwise.
    • add

      public void add(long key)
      Description copied from interface: IBmLongSet
      Adds the specified element.
      Specified by:
      add in interface IBmLongSet
      Parameters:
      key - the element to add.
    • remove

      public boolean remove(long key)
      Description copied from interface: IBmLongSet
      Removes the specified element.
      Specified by:
      remove in interface IBmLongSet
      Parameters:
      key - the element to remove.
      Returns:
      true if this set contained the specified element, false otherwise.
    • removeAll

      public void removeAll(Set<Long> set)
    • copyKeys

      public List<Long> copyKeys()
    • size

      public int size()
      Description copied from interface: IBmLongSet
      Returns the number of elements in this set.
      Specified by:
      size in interface IBmLongSet
      Returns:
      the number of elements in this set.
    • asMap

      public BmLongHashSet asMap()
    • getSegments

      public BmLongHashSet[] getSegments()
    • haveItems

      public boolean haveItems()
    • addAll

      public void addAll(IBmLongSet values)
      Description copied from interface: IBmLongSet
      Adds all the values from the specified collection.
      Specified by:
      addAll in interface IBmLongSet
      Parameters:
      values - the collection of values to add.
    • addAll

      public void addAll(Iterable<Long> values)
      Description copied from interface: IBmLongSet
      Adds all the values from the specified collection.
      Specified by:
      addAll in interface IBmLongSet
      Parameters:
      values - the collection of values to add.
    • addAll

      public void addAll(long[] array)
      Description copied from interface: IBmLongSet
      Adds all the values from the specified array.
      Specified by:
      addAll in interface IBmLongSet
      Parameters:
      array - the array. May not be null.
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: IBmLongSet
      Checks whether this set is empty.
      Specified by:
      isEmpty in interface IBmLongSet
      Returns:
      true if this set has no elements, false otherwise.
      See Also:
    • keys

      public Collection<Long> keys()
      Description copied from interface: IBmLongSet
      Gets collection of elements.
      Specified by:
      keys in interface IBmLongSet
      Returns:
      the collection of elements.