Package net.dona.doip
Class InDoipMessageFromJson
- java.lang.Object
-
- net.dona.doip.InDoipMessageFromJson
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Iterable<InDoipSegment>
,InDoipMessage
public class InDoipMessageFromJson extends java.lang.Object implements InDoipMessage
An implementation ofInDoipMessage
constructed by supplying a singleJsonElement
, which will lead to a single JSON segment in the message.
-
-
Constructor Summary
Constructors Constructor Description InDoipMessageFromJson(com.google.gson.JsonElement json)
Constructs anInDoipMessage
with a single JSON segment containing the supplied JSON.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
A no-op for this implementation.java.util.Iterator<InDoipSegment>
iterator()
java.util.Spliterator<InDoipSegment>
spliterator()
java.util.stream.Stream<InDoipSegment>
stream()
Returns an stream over elements of typeInDoipSegment
.
-
-
-
Constructor Detail
-
InDoipMessageFromJson
public InDoipMessageFromJson(com.google.gson.JsonElement json)
Constructs anInDoipMessage
with a single JSON segment containing the supplied JSON.- Parameters:
json
- the JSON of the single segment of the message
-
-
Method Detail
-
iterator
public java.util.Iterator<InDoipSegment> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<InDoipSegment>
-
spliterator
public java.util.Spliterator<InDoipSegment> spliterator()
- Specified by:
spliterator
in interfacejava.lang.Iterable<InDoipSegment>
-
stream
public java.util.stream.Stream<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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceInDoipMessage
-
-