Top Fields Constructors Methods
tools.jackson.datatype.eclipsecollections.ser

public abstract Class EclipsePrimitiveIterableSerializer<C extends PrimitiveIterable>

extends PrimitiveIterableSerializer<C extends PrimitiveIterable>
Class Inheritance
Known Direct Subclasses
tools.jackson.datatype.eclipsecollections.ser.FloatIterableSerializer, tools.jackson.datatype.eclipsecollections.ser.IntIterableSerializer, tools.jackson.datatype.eclipsecollections.ser.LongIterableSerializer, tools.jackson.datatype.eclipsecollections.ser.ShortIterableSerializer, tools.jackson.datatype.eclipsecollections.ser.BooleanIterableSerializer, tools.jackson.datatype.eclipsecollections.ser.DoubleIterableSerializer
Imports
tools.jackson.databind.BeanProperty, .JavaType, .SerializationContext, tools.jackson.databind.type.TypeFactory, tools.jackson.datatype.primitive_collections_base.ser.PrimitiveIterableSerializer, org.eclipse.collections.api.PrimitiveIterable

Field Summary

Modifier and TypeField and Description
private static final TypeFactory
Inherited from tools.jackson.datatype.primitive_collections_base.ser.PrimitiveIterableSerializer:
_elementType_property_unwrapSingle

Constructor Summary

AccessConstructor and Description
protected
EclipsePrimitiveIterableSerializer(Class<C> type, JavaType elementType, BeanProperty property, Boolean unwrapSingle)

Method Summary

Modifier and TypeMethod and Description
protected static JavaType
elementType(Class<?> rawElementType)

public boolean
hasSingleElement(C value)

Implements abstract tools.jackson.databind.ser.std.StdContainerSerializer.hasSingleElement.

Method called to determine if the given value (of type handled by this serializer) contains exactly one element.

public boolean
isEmpty(SerializationContext ctxt, C value)

Implements abstract tools.jackson.databind.ser.std.StdContainerSerializer.isEmpty.

Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

Inherited from tools.jackson.datatype.primitive_collections_base.ser.PrimitiveIterableSerializer:
_withValueTypeSerializergetContentSerializergetContentTypeserializeserializeContentsserializeWithType

Field Detail

TYPE_Fback to summary
private static final TypeFactory TYPE_F

Constructor Detail

EclipsePrimitiveIterableSerializerback to summary
protected EclipsePrimitiveIterableSerializer(Class<C> type, JavaType elementType, BeanProperty property, Boolean unwrapSingle)

Method Detail

elementTypeback to summary
protected static JavaType elementType(Class<?> rawElementType)
hasSingleElementback to summary
public boolean hasSingleElement(C value)

Implements abstract tools.jackson.databind.ser.std.StdContainerSerializer.hasSingleElement.

Doc from tools.jackson.databind.ser.std.StdContainerSerializer.hasSingleElement.

Method called to determine if the given value (of type handled by this serializer) contains exactly one element.

Note

although it might seem sensible to instead define something like "getElementCount()" method, this would not work well for containers that do not keep track of size (like linked lists may not).

Note, too, that this method is only called by serializer itself; and specifically is not used for non-array/collection types like Map or Map.Entry instances.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty(SerializationContext ctxt, C value)

Implements abstract tools.jackson.databind.ser.std.StdContainerSerializer.isEmpty.

Doc from tools.jackson.databind.ValueSerializer.isEmpty.

Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

Default implementation will consider only null values to be empty.

Annotations
@Override