public class ScalarMapSet
extends java.lang.Object
Constructor and Description |
---|
ScalarMapSet()
Constructs from nothing.
|
ScalarMapSet(java.util.Collection col)
Constructs from a
Collection of
ScalarMap s. |
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 ScalarMap s. |
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 ScalarMap s. |
void |
clear()
Clears the set of
ScalarMap s. |
static ScalarMapSet |
combine(ScalarMapSet set1,
ScalarMapSet set2)
Combines the
ScalarMap s 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 ScalarMap s. |
void |
removeAll()
Removes all
ScalarMap s from this instance. |
int |
size()
Returns the number of
ScalarMap s in this set. |
java.lang.String |
toString()
Returns a string representation of this instance.
|
public ScalarMapSet()
public ScalarMapSet(ScalarMapSet that)
ScalarMap
s of the
other instance are not cloned.that
- The other instance.public ScalarMapSet(java.util.Collection col)
Collection
of
ScalarMap
s. The ScalarMap
s 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 ScalarMap
s.that
- The other set of ScalarMap
s.java.lang.NullPointerException
- if the other set is null
.public void add(java.util.Collection col)
Collection
to this instance's
set of ScalarMap
s.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 ScalarMap
s.
that
- The other set of ScalarMap
s.java.lang.NullPointerException
- if the other set is null
.public void removeAll()
Removes all ScalarMap
s from this instance.
public int size()
ScalarMap
s in this set.ScalarMap
s in this
set.public void clear()
ScalarMap
s.public java.util.Iterator iterator()
Iterator.next()
method have type ScalarMap
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
Returns a string representation of this instance.
toString
in class java.lang.Object
public static ScalarMapSet combine(ScalarMapSet set1, ScalarMapSet set2)
Combines the ScalarMap
s of two sets.
ScalarMap
s in the second set override
ScalarMap
s for the same DisplayRealType
in the first set. The input sets are not modified.
set1
- The first set.set2
- The second set.