public class ScalarMapSet
extends java.lang.Object
| Constructor and Description |
|---|
ScalarMapSet()
Constructs from nothing.
|
ScalarMapSet(java.util.Collection col)
Constructs from a
Collection of
ScalarMaps. |
ScalarMapSet(ScalarMapSet that)
Constructs from another instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.util.Collection col)
Adds the contents of a
Collection to this instance's
set of ScalarMaps. |
visad.ScalarMap |
add(visad.ScalarMap map)
Adds a
ScalarMap to this set. |
void |
add(ScalarMapSet that)
Adds the contents of another
ScalarMapSet to this instance's
set of ScalarMaps. |
void |
clear()
Clears the set of
ScalarMaps. |
static ScalarMapSet |
combine(ScalarMapSet set1,
ScalarMapSet set2)
Combines the
ScalarMaps of two sets. |
boolean |
equals(java.lang.Object obj)
Indicates if this instance equals an object.
|
visad.ScalarMap |
get(visad.ScalarMap template)
Returns the
ScalarMap in this instance that matches a
template. |
int |
hashCode()
Returns the hash code of this instance.
|
java.util.Iterator |
iterator()
Returns an iterator for this instance.
|
boolean |
remove(visad.ScalarMap map)
Removes a ScalarMap from this set.
|
void |
remove(ScalarMapSet that)
Removes the contents of another
ScalarMapSet from this
instance's set of ScalarMaps. |
void |
removeAll()
Removes all
ScalarMaps from this instance. |
int |
size()
Returns the number of
ScalarMaps in this set. |
java.lang.String |
toString()
Returns a string representation of this instance.
|
public ScalarMapSet()
public ScalarMapSet(ScalarMapSet that)
ScalarMaps of the
other instance are not cloned.that - The other instance.public ScalarMapSet(java.util.Collection col)
Collection of
ScalarMaps. The ScalarMaps of the
Collection are not cloned.col - The collection of ScalarMap-s.java.lang.ClassCastException - if an element in the collection is not a
ScalarMap.public visad.ScalarMap add(visad.ScalarMap map)
ScalarMap to this set. The previous
ScalarMap is returned if it exists; otherwise
null is returned.map - The ScalarMap to be added to
this set.ScalarMap or
null.public void add(ScalarMapSet that)
ScalarMapSet to this instance's
set of ScalarMaps.that - The other set of ScalarMaps.java.lang.NullPointerException - if the other set is null.public void add(java.util.Collection col)
Collection to this instance's
set of ScalarMaps.col - The Collection of ScalarMap-s to be added.java.lang.NullPointerException - if the Collection is null.java.lang.ClassCastException - if an element of the Collection isn't a
ScalarMap.public visad.ScalarMap get(visad.ScalarMap template)
ScalarMap in this instance that matches a
template. Returns null is no such ScalarMap
exists.template - The template.public boolean remove(visad.ScalarMap map)
map - The ScalarMap to be removed.true if and only if the ScalarMap
existed.public void remove(ScalarMapSet that)
Removes the contents of another ScalarMapSet from this
instance's set of ScalarMaps.
that - The other set of ScalarMaps.java.lang.NullPointerException - if the other set is null.public void removeAll()
Removes all ScalarMaps from this instance.
public int size()
ScalarMaps in this set.ScalarMaps in this
set.public void clear()
ScalarMaps.public java.util.Iterator iterator()
Iterator.next() method have type ScalarMap.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
Returns a string representation of this instance.
toString in class java.lang.Objectpublic static ScalarMapSet combine(ScalarMapSet set1, ScalarMapSet set2)
Combines the ScalarMaps of two sets.
ScalarMaps in the second set override
ScalarMaps for the same DisplayRealType
in the first set. The input sets are not modified.
set1 - The first set.set2 - The second set.