Package com.actelion.research.util.hash
Class HashSetInt
- java.lang.Object
-
- com.actelion.research.util.hash.HashSetInt
-
public class HashSetInt extends java.lang.ObjectHashSetIntCopyright: Actelion Ltd., Inc. All Rights Reserved This software is the proprietary information of Actelion Pharmaceuticals, Ltd. Use is subject to license terms.
- Version:
- 1.0 4 Mar 2010 MvK: Start implementation
- Author:
- Modest von Korff
-
-
Constructor Summary
Constructors Constructor Description HashSetInt()HashSetInt(int capacity)HashSetInt(int[] a)HashSetInt(java.util.List<java.lang.Integer> li)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(int v)If the key is already present nothing will happen.booleanadd(int[] a)booleanadd(java.util.List<java.lang.Integer> li)voidclear()booleancontains(int v)int[]getValues()Deep copy.voidremove(int v)intsize()java.util.List<java.lang.Integer>toList()
-
-
-
Method Detail
-
clear
public void clear()
-
add
public boolean add(int v)
If the key is already present nothing will happen.- Parameters:
v-- Returns:
- false if key is already present.
-
add
public boolean add(int[] a)
-
add
public boolean add(java.util.List<java.lang.Integer> li)
-
remove
public void remove(int v)
-
contains
public boolean contains(int v)
-
size
public int size()
-
getValues
public int[] getValues()
Deep copy.- Returns:
-
toList
public java.util.List<java.lang.Integer> toList()
-
-