Package opennlp.tools.util
Class ObjectStreamUtils
java.lang.Object
opennlp.tools.util.ObjectStreamUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ObjectStream<T> concatenateObjectStream(Collection<ObjectStream<T>> streams) Creates a single concatenated ObjectStream from multiple individual ObjectStreams with the same type.static <T> ObjectStream<T> concatenateObjectStream(ObjectStream<T>... streams) Creates a single concatenated ObjectStream from multiple individual ObjectStreams with the same type.static <T> ObjectStream<T> createObjectStream(Collection<T> collection) Creates anObjectStreamform a collection.static <T> ObjectStream<T> createObjectStream(T... array) Creates anObjectStreamform an array.
-
Constructor Details
-
ObjectStreamUtils
public ObjectStreamUtils()
-
-
Method Details
-
createObjectStream
Creates anObjectStreamform an array.- Type Parameters:
T-- Parameters:
array-- Returns:
- the object stream over the array elements
-
createObjectStream
Creates anObjectStreamform a collection.- Type Parameters:
T-- Parameters:
collection-- Returns:
- the object stream over the collection elements
-
concatenateObjectStream
Creates a single concatenated ObjectStream from multiple individual ObjectStreams with the same type.- Parameters:
streams-- Returns:
-
concatenateObjectStream
Creates a single concatenated ObjectStream from multiple individual ObjectStreams with the same type.- Parameters:
streams-- Returns:
-