de.rwth.domains.templates
Class NumberSet
java.lang.Object
|
+--de.rwth.domains.templates.NumberSet
- All Implemented Interfaces:
- Set
- public class NumberSet
- extends java.lang.Object
- implements Set
Class for the set of all Number
objects.
- Version:
- $Id: NumberSet.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
- See Also:
Number
Constructor Summary |
NumberSet()
Creates a new 'NumberSet' instance. |
Method Summary |
boolean |
equals(java.lang.Object param1,
java.lang.Object param2)
Two Numbers objects are equal in this set, if the first is not
null and is equal to the second. |
boolean |
isElement(java.lang.Object param1)
All Number objects are element of this set. |
java.util.Iterator |
iterator()
Always throws an IllegalArgumentException . |
java.util.Iterator |
iteratorSkel()
Returns an iterator, which has 42 as only element. |
long |
size()
Always returns -1. |
long |
sizeSkel()
Always returns 1. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberSet
public NumberSet()
- Creates a new 'NumberSet' instance.
equals
public boolean equals(java.lang.Object param1,
java.lang.Object param2)
- Two
Numbers
objects are equal in this set, if the first is not
null
and is equal to the second.
- Specified by:
equals
in interface Set
- Parameters:
param1
- param2
- - Returns:
isElement
public boolean isElement(java.lang.Object param1)
- All
Number
objects are element of this set.
- Specified by:
isElement
in interface Set
- Parameters:
param1
- an Object
value- Returns:
- a
boolean
value
iterator
public java.util.Iterator iterator()
- Always throws an
IllegalArgumentException
.
- Specified by:
iterator
in interface Set
- Returns:
iteratorSkel
public java.util.Iterator iteratorSkel()
- Returns an iterator, which has 42 as only element.
- Specified by:
iteratorSkel
in interface Set
- Returns:
- an
Iterator
value
size
public long size()
- Always returns -1.
- Specified by:
size
in interface Set
- Returns:
- a
long
value
sizeSkel
public long sizeSkel()
- Always returns 1.
- Specified by:
sizeSkel
in interface Set
- Returns:
- a
long
value