Package pcap.common.util
Class Sets
java.lang.Object
pcap.common.util.Sets
@Inclubating public final class Sets extends Object
- Author:
- Ardika Rommy Sanjaya
-
Constructor Summary
Constructors Constructor Description Sets()
-
Method Summary
Modifier and Type Method Description static <E> Set<E>
createHashSet(int expectedMapSize)
Create anHashSet
with its initialCapacity calculated to minimize rehash operationsstatic <E> Set<E>
createLinkedHashSet(int expectedMapSize)
Create anLinkedHashSet
with its initialCapacity calculated to minimize rehash operations
-
Constructor Details
-
Sets
public Sets()
-
-
Method Details
-
createHashSet
Create anHashSet
with its initialCapacity calculated to minimize rehash operations- Type Parameters:
E
- type.- Parameters:
expectedMapSize
- expected map size- Returns:
- returns
Set
object.
-
createLinkedHashSet
Create anLinkedHashSet
with its initialCapacity calculated to minimize rehash operations- Type Parameters:
E
- type.- Parameters:
expectedMapSize
- expected map size- Returns:
- returns
Set
object.
-