Class PrimitiveByteAccessor
java.lang.Object
org.tquadrat.foundation.config.spi.prefs.PreferenceAccessor<Byte>
org.tquadrat.foundation.config.spi.prefs.PrimitiveByteAccessor
@ClassVersion(sourceVersion="$Id: PrimitiveByteAccessor.java 1151 2025-10-01 21:32:15Z tquadrat $")
@API(status=STABLE,
since="0.0.1")
public final class PrimitiveByteAccessor
extends PreferenceAccessor<Byte>
The implementation of
PreferenceAccessor
for byte.
This differs from
ByteAccessor
as it forces 0 (zero) as the default value, while the other
implementation has null as the default value.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: PrimitiveByteAccessor.java 1151 2025-10-01 21:32:15Z tquadrat $
- Since:
- 0.0.1
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.config.spi.prefs.PrimitiveByteAccessor"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidreadPreference(Preferences node) Reads the preference value from the given node and writes it to the property.final voidwritePreference(Preferences node) Writes the preference value from the property and writes it to the given node.Methods inherited from class PreferenceAccessor
getPropertyName, getter, hasKey, setter
-
Constructor Details
-
PrimitiveByteAccessor
-
-
Method Details
-
readPreference
Reads the preference value from the given node and writes it to the property.- Specified by:
readPreferencein classPreferenceAccessor<Byte>- Parameters:
node- The preference node.- Throws:
InvalidPreferenceValueException- The preferences value cannot be translated to the property type.
-
writePreference
Writes the preference value from the property and writes it to the given node.- Specified by:
writePreferencein classPreferenceAccessor<Byte>- Parameters:
node- The preference node.
-
