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 ofInDoipMessageconstructed 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 anInDoipMessagewith a single JSON segment containing the supplied JSON.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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 anInDoipMessagewith 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:
iteratorin interfacejava.lang.Iterable<InDoipSegment>
-
spliterator
public java.util.Spliterator<InDoipSegment> spliterator()
- Specified by:
spliteratorin interfacejava.lang.Iterable<InDoipSegment>
-
stream
public java.util.stream.Stream<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 interfacejava.lang.AutoCloseable- Specified by:
closein interfaceInDoipMessage
-
-