com.davisor.data.stream
Class EnumeratorTypeStream
java.lang.Object
com.davisor.data.VoidData
com.davisor.data.stream.EnumeratorDataStream
com.davisor.data.stream.EnumeratorTypeStream
- All Implemented Interfaces:
- Data, DataStream
- public class EnumeratorTypeStream
- extends EnumeratorDataStream
EnumeratorTypeStream represents an enumerator data stream that
enforces the common stream type over all stream elements. In particular,
all elements are converted to the stream type before they are
returned. The original objects in the stream source are not changed.
- Since:
- JDK1.1
- See Also:
getDataValue(java.lang.Object),
EnumeratorTypeStream,
Type
|
Constructor Summary |
EnumeratorTypeStream(java.util.Enumeration enumerator)
Creates a data stream out of an enumerator. |
EnumeratorTypeStream(java.util.Enumeration enumerator,
Type type)
Creates a data stream out of an enumerator and the given type. |
|
Method Summary |
protected DataValue |
getDataValue(java.lang.Object object)
Makes a data value of the stream type. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.davisor.data.Data |
getType |
EnumeratorTypeStream
public EnumeratorTypeStream(java.util.Enumeration enumerator)
throws InvalidDataException
- Creates a data stream out of an enumerator. The data stream type
is taken from the first element in the enumerator
- Throws:
InvalidDataException - if the first element is not a DataValue- See Also:
EnumeratorTypeStream(Enumeration,Type)
EnumeratorTypeStream
public EnumeratorTypeStream(java.util.Enumeration enumerator,
Type type)
throws InvalidDataException
- Creates a data stream out of an enumerator and the given type.
- Throws:
InvalidDataException - if the collection content does not
satisfy the given type.- See Also:
EnumeratorTypeStream(Enumeration)
getDataValue
protected DataValue getDataValue(java.lang.Object object)
throws InvalidDataException
- Makes a data value of the stream type.
- Overrides:
getDataValue in class VoidData
- Throws:
InvalidDataException - if the element could not be converted
to the current type- See Also:
Type.toData(Object)
Copyright © 2001-2004 Davisor Oy. All Rights Reserved.