Package net.dona.doip
Class InDoipMessageFromCollection
java.lang.Object
net.dona.doip.InDoipMessageFromCollection
- All Implemented Interfaces:
AutoCloseable,Iterable<InDoipSegment>,InDoipMessage
An implementation of
InDoipMessage constructed by supplying an explicit collection of InDoipSegment objects.-
Constructor Summary
ConstructorsConstructorDescriptionInDoipMessageFromCollection(Collection<InDoipSegment> segments) Constructs anInDoipMessageobject whose segments are those in the supplied collection. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()A no-op for this implementation.iterator()stream()Returns an stream over elements of typeInDoipSegment.
-
Constructor Details
-
InDoipMessageFromCollection
Constructs anInDoipMessageobject whose segments are those in the supplied collection.- Parameters:
segments- the segments of the message
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<InDoipSegment>
-
spliterator
- Specified by:
spliteratorin interfaceIterable<InDoipSegment>
-
stream
Description copied from interface:InDoipMessageReturns an stream over elements of typeInDoipSegment.- Specified by:
streamin interfaceInDoipMessage- Returns:
- a Stream.
-
close
public void close()A no-op for this implementation.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceInDoipMessage
-