Package com.lucimber.dbus.codec.decoder
Class DecoderResultImpl<ValueT extends DBusType>
java.lang.Object
com.lucimber.dbus.codec.decoder.DecoderResultImpl<ValueT>
- Type Parameters:
ValueT- The value's data type.
- All Implemented Interfaces:
DecoderResult<ValueT>
public final class DecoderResultImpl<ValueT extends DBusType>
extends Object
implements DecoderResult<ValueT>
Default implementation of the decoder result interface.
-
Constructor Summary
ConstructorsConstructorDescriptionDecoderResultImpl(int consumedBytes, ValueT value) Constructs a new decoder result. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of bytes, that have been consumed by a decoder while producing this result.getValue()Gets the decoded value.voidsetConsumedBytes(int consumedBytes) Sets the number of bytes, that have been consumed by a decoder while producing this result.
-
Constructor Details
-
DecoderResultImpl
Constructs a new decoder result.- Parameters:
consumedBytes- number of consumed bytesvalue- the decoded value
-
-
Method Details
-
getConsumedBytes
public int getConsumedBytes()Description copied from interface:DecoderResultGets the number of bytes, that have been consumed by a decoder while producing this result.- Specified by:
getConsumedBytesin interfaceDecoderResult<ValueT extends DBusType>- Returns:
- An integer as the number of consumed bytes.
-
setConsumedBytes
public void setConsumedBytes(int consumedBytes) Description copied from interface:DecoderResultSets the number of bytes, that have been consumed by a decoder while producing this result.- Specified by:
setConsumedBytesin interfaceDecoderResult<ValueT extends DBusType>- Parameters:
consumedBytes- anInteger
-
getValue
Description copied from interface:DecoderResultGets the decoded value.- Specified by:
getValuein interfaceDecoderResult<ValueT extends DBusType>- Returns:
- the value.
-