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 anInDoipMessage
object whose segments are those in the supplied collection. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
A no-op for this implementation.iterator()
stream()
Returns an stream over elements of typeInDoipSegment
.
-
Constructor Details
-
InDoipMessageFromCollection
Constructs anInDoipMessage
object whose segments are those in the supplied collection.- Parameters:
segments
- the segments of the message
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceIterable<InDoipSegment>
-
spliterator
- Specified by:
spliterator
in interfaceIterable<InDoipSegment>
-
stream
Description copied from interface:InDoipMessage
Returns an stream over elements of typeInDoipSegment
.- Specified by:
stream
in interfaceInDoipMessage
- Returns:
- a Stream.
-
close
public void close()A no-op for this implementation.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceInDoipMessage
-