public final class SetUtil extends Object
Modifier and Type | Method and Description |
---|---|
static PartitionIdSet |
allPartitionIds(int partitionCount) |
static <E> Set<E> |
createHashSet(int expectedMapSize)
Utility method that creates an
HashSet with its initialCapacity calculated
to minimize rehash operations |
static <E> Set<E> |
createLinkedHashSet(int expectedMapSize)
Utility method that creates an
LinkedHashSet with its initialCapacity calculated
to minimize rehash operations |
static PartitionIdSet |
immutablePartitionIdSet(int partitionCount,
Collection<Integer> partitionIds) |
static PartitionIdSet |
singletonPartitionIdSet(int partitionCount,
int partitionId) |
public static <E> Set<E> createHashSet(int expectedMapSize)
HashSet
with its initialCapacity calculated
to minimize rehash operationspublic static <E> Set<E> createLinkedHashSet(int expectedMapSize)
LinkedHashSet
with its initialCapacity calculated
to minimize rehash operationspublic static PartitionIdSet singletonPartitionIdSet(int partitionCount, int partitionId)
public static PartitionIdSet immutablePartitionIdSet(int partitionCount, Collection<Integer> partitionIds)
public static PartitionIdSet allPartitionIds(int partitionCount)
Copyright © 2019 Hazelcast, Inc.. All rights reserved.