hep.graphics.heprep.util
Class ValueSet
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--hep.graphics.heprep.util.ValueSet
- All Implemented Interfaces:
- Collection, Set
- public class ValueSet
- extends AbstractSet
This Set is created from a Map and will allow iteration over its values as a Set.
This implies that all values added to the Map are distinctive, for instance because
each value contains its own key. The methods equals() and hashCode() of the values
need to be implemented properly for this to work.
- Version:
- $Id: ValueSet.java,v 1.1 2003/12/02 23:46:46 duns Exp $
- Author:
- M.Donszelmann
Constructor Summary |
ValueSet(Map map)
Construct a ValueSet of the entries in this Map. |
ValueSet
public ValueSet(Map map)
- Construct a ValueSet of the entries in this Map. Map is allowed to be null which results in
an empty set.
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Set
- Specified by:
iterator
in class AbstractCollection
size
public int size()
- Specified by:
size
in interface Set
- Specified by:
size
in class AbstractCollection
contains
public boolean contains(Object v)
- Specified by:
contains
in interface Set
- Overrides:
contains
in class AbstractCollection
Copyright © 2000-2003 FreeHEP, All Rights Reserved.