FreeHEP API
Version v1.2.2

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.
 
Method Summary
 boolean contains(Object v)
           
 Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray
 

Constructor Detail

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.

Method Detail

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

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.