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 TypeMethodDescriptionvoidadd(long key) Adds the specified element.voidaddAll(long[] array) Adds all the values from the specified array.voidaddAll(IBmLongSet values) Adds all the values from the specified collection.voidAdds all the values from the specified collection.asMap()voidclear()Removes all the elements.booleancontains(long key) Checks if the set contains the specified element.copyKeys()Gets entry iterator.getMap(long key) protected longbooleanbooleanisEmpty()Checks whether this set is empty.iterator()Gets the long value iteratorkeys()Gets collection of elements.booleanremove(long key) Removes the specified element.voidintsize()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:IBmLongSetGets entry iterator.- Specified by:
entryIteratorin interfaceIBmLongSet- Returns:
- an entry iterator.
-
iterator
Description copied from interface:IBmLongSetGets the long value iterator- Specified by:
iteratorin interfaceIBmLongSet- Returns:
- The iterator of values. May not be
null
-
clear
public void clear()Description copied from interface:IBmLongSetRemoves all the elements.- Specified by:
clearin interfaceIBmLongSet- See Also:
-
getMap
-
contains
public boolean contains(long key) Description copied from interface:IBmLongSetChecks if the set contains the specified element.- Specified by:
containsin interfaceIBmLongSet- Parameters:
key- the element.- Returns:
trueif set contains the specified element,falseotherwise.
-
add
public void add(long key) Description copied from interface:IBmLongSetAdds the specified element.- Specified by:
addin interfaceIBmLongSet- Parameters:
key- the element to add.
-
remove
public boolean remove(long key) Description copied from interface:IBmLongSetRemoves the specified element.- Specified by:
removein interfaceIBmLongSet- Parameters:
key- the element to remove.- Returns:
trueif this set contained the specified element,falseotherwise.
-
removeAll
-
copyKeys
-
size
public int size()Description copied from interface:IBmLongSetReturns the number of elements in this set.- Specified by:
sizein interfaceIBmLongSet- Returns:
- the number of elements in this set.
-
asMap
-
getSegments
-
haveItems
public boolean haveItems() -
addAll
Description copied from interface:IBmLongSetAdds all the values from the specified collection.- Specified by:
addAllin interfaceIBmLongSet- Parameters:
values- the collection of values to add.
-
addAll
Description copied from interface:IBmLongSetAdds all the values from the specified collection.- Specified by:
addAllin interfaceIBmLongSet- Parameters:
values- the collection of values to add.
-
addAll
public void addAll(long[] array) Description copied from interface:IBmLongSetAdds all the values from the specified array.- Specified by:
addAllin interfaceIBmLongSet- Parameters:
array- the array. May not benull.
-
isEmpty
public boolean isEmpty()Description copied from interface:IBmLongSetChecks whether this set is empty.- Specified by:
isEmptyin interfaceIBmLongSet- Returns:
trueif this set has no elements,falseotherwise.- See Also:
-
keys
Description copied from interface:IBmLongSetGets collection of elements.- Specified by:
keysin interfaceIBmLongSet- Returns:
- the collection of elements.
-