Class BmLongSegmentSyncSet
java.lang.Object
com._1c.g5.v8.bm.common.collections.BmLongSegmentSyncSet
- All Implemented Interfaces:
IBmLongSet
A Long set with segment synchronization.
Implementation limited only for put/get/remove operations.
Iterations are not supported.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com._1c.g5.v8.bm.common.collections.IBmLongSet
IBmLongSet.Entry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long key) Adds the specified element.void
addAll
(long[] array) Adds all the values from the specified array.void
addAll
(IBmLongSet values) Adds all the values from the specified collection.void
Adds all the values from the specified collection.asMap()
void
clear()
Removes all the elements.boolean
contains
(long key) Checks if the set contains the specified element.copyKeys()
Gets entry iterator.getMap
(long key) protected long
boolean
boolean
isEmpty()
Checks whether this set is empty.iterator()
Gets the long value iteratorkeys()
Gets collection of elements.boolean
remove
(long key) Removes the specified element.void
int
size()
Returns the number of elements in this set.
-
Field Details
-
hashSalt
protected final long hashSalt
-
-
Constructor Details
-
BmLongSegmentSyncSet
public BmLongSegmentSyncSet(int segments)
-
-
Method Details
-
hashSaltValue
protected long hashSaltValue() -
entryIterator
Description copied from interface:IBmLongSet
Gets entry iterator.- Specified by:
entryIterator
in interfaceIBmLongSet
- Returns:
- an entry iterator.
-
iterator
Description copied from interface:IBmLongSet
Gets the long value iterator- Specified by:
iterator
in interfaceIBmLongSet
- 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 interfaceIBmLongSet
- See Also:
-
getMap
-
contains
public boolean contains(long key) Description copied from interface:IBmLongSet
Checks if the set contains the specified element.- Specified by:
contains
in interfaceIBmLongSet
- 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 interfaceIBmLongSet
- 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 interfaceIBmLongSet
- Parameters:
key
- the element to remove.- Returns:
true
if this set contained the specified element,false
otherwise.
-
removeAll
-
copyKeys
-
size
public int size()Description copied from interface:IBmLongSet
Returns the number of elements in this set.- Specified by:
size
in interfaceIBmLongSet
- Returns:
- the number of elements in this set.
-
asMap
-
getSegments
-
haveItems
public boolean haveItems() -
addAll
Description copied from interface:IBmLongSet
Adds all the values from the specified collection.- Specified by:
addAll
in interfaceIBmLongSet
- Parameters:
values
- the collection of values to add.
-
addAll
Description copied from interface:IBmLongSet
Adds all the values from the specified collection.- Specified by:
addAll
in interfaceIBmLongSet
- 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 interfaceIBmLongSet
- Parameters:
array
- the array. May not benull
.
-
isEmpty
public boolean isEmpty()Description copied from interface:IBmLongSet
Checks whether this set is empty.- Specified by:
isEmpty
in interfaceIBmLongSet
- Returns:
true
if this set has no elements,false
otherwise.- See Also:
-
keys
Description copied from interface:IBmLongSet
Gets collection of elements.- Specified by:
keys
in interfaceIBmLongSet
- Returns:
- the collection of elements.
-