Package io.protostuff.runtime
Class ArrayFieldMap<T>
java.lang.Object
io.protostuff.runtime.ArrayFieldMap<T>
- All Implemented Interfaces:
FieldMap<T>
Field mapping implemented on top of java array for lookup by number.
This is the most efficient implementation for almost all cases. But
it should not be used when field numbers are sparse and especially
when max field number is big - as this mapping internally uses array
of integers with size equal to max field number. In latter case
HashFieldMap
should be used.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFieldByName
(String fieldName) getFieldByNumber
(int n) int
Returns the message's total number of fields.
-
Field Details
-
fields
-
fieldsByNumber
-
fieldsByName
-
-
Constructor Details
-
ArrayFieldMap
-
-
Method Details
-
getFieldByNumber
- Specified by:
getFieldByNumber
in interfaceFieldMap<T>
-
getFieldByName
- Specified by:
getFieldByName
in interfaceFieldMap<T>
-
getFieldCount
public int getFieldCount()Returns the message's total number of fields.- Specified by:
getFieldCount
in interfaceFieldMap<T>
-
getFields
-