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
public abstract class AbstractPrimitiveValueTranscoder<T> extends AbstractStringValueTranscoder<T>
Base class for primitive value transcoders.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
primitive
Whether this transcoder operates on a primitive or an object.
-
Constructor Summary
Constructors Constructor Description AbstractPrimitiveValueTranscoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
encodeStringValue(T value)
Encodes the supplied value into an ldap attribute value.boolean
isPrimitive()
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
-
-
-
-
Method Detail
-
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
public String encodeStringValue(T value)
Description copied from interface:ValueTranscoder
Encodes the supplied value into an ldap attribute value.- Parameters:
value
- to encode- Returns:
- encoded value
-
-