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 anInDoipMessage
object with a single JSON segment containing the supplied JSON. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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 anInDoipMessage
object 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:
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
-