Package net.dona.doip
Class InDoipMessageFromJson
java.lang.Object
net.dona.doip.InDoipMessageFromJson
- All Implemented Interfaces:
AutoCloseable,Iterable<InDoipSegment>,InDoipMessage
An implementation of
InDoipMessage constructed by supplying a single JsonElement, which will lead to
a single JSON segment in the message.-
Constructor Summary
ConstructorsConstructorDescriptionInDoipMessageFromJson(com.google.gson.JsonElement json) Constructs anInDoipMessageobject with a single JSON segment containing the supplied JSON. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()A no-op for this implementation.iterator()stream()Returns an stream over elements of typeInDoipSegment.
-
Constructor Details
-
InDoipMessageFromJson
public InDoipMessageFromJson(com.google.gson.JsonElement json) Constructs anInDoipMessageobject with a single JSON segment containing the supplied JSON.- Parameters:
json- the JSON of the single segment 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
-