Package org.ldaptive.transcode
Class AbstractPrimitiveValueTranscoder<T>
java.lang.Object
org.ldaptive.transcode.AbstractStringValueTranscoder<T>
org.ldaptive.transcode.AbstractPrimitiveValueTranscoder<T>
- Type Parameters:
T
- type of object to transcode
- All Implemented Interfaces:
ValueTranscoder<T>
- Direct Known Subclasses:
BooleanValueTranscoder
,DoubleValueTranscoder
,FloatValueTranscoder
,IntegerValueTranscoder
,LongValueTranscoder
,ShortValueTranscoder
Base class for primitive value transcoders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether this transcoder operates on a primitive or an object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodeStringValue
(T value) Encodes the supplied value into an ldap attribute value.boolean
Returns whether this transcoder operates on a primitive value.void
setPrimitive
(boolean b) Sets whether this transcoder operates on a primitive value.Methods inherited from class org.ldaptive.transcode.AbstractStringValueTranscoder
decodeBinaryValue, encodeBinaryValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ldaptive.transcode.ValueTranscoder
decoder, decodeStringValue, encoder, getType
-
Field Details
-
primitive
private boolean primitiveWhether this transcoder operates on a primitive or an object.
-
-
Constructor Details
-
AbstractPrimitiveValueTranscoder
public AbstractPrimitiveValueTranscoder()
-
-
Method Details
-
isPrimitive
public boolean isPrimitive()Returns whether this transcoder operates on a primitive value.- Returns:
- whether this transcoder operates on a primitive value
-
setPrimitive
public void setPrimitive(boolean b) Sets whether this transcoder operates on a primitive value.- Parameters:
b
- whether this transcoder operates on a primitive value
-
encodeStringValue
Description copied from interface:ValueTranscoder
Encodes the supplied value into an ldap attribute value.- Parameters:
value
- to encode- Returns:
- encoded value
-