-
- All Implemented Interfaces:
-
com.facebook.react.common.mapbuffer.MapBuffer,kotlin.collections.Iterable
@NotThreadSafe() public final class ReadableMapBuffer implements MapBuffer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classReadableMapBuffer.Companion
-
Method Summary
Modifier and Type Method Description IntegergetCount()Number of elements inserted into current MapBuffer. UnitsetCount(Integer count)Booleancontains(Integer key)Checks whether entry for given key exists in MapBuffer. IntegergetKeyOffset(Integer key)Provides offset of the key to use for entryAt, for cases when offset is not statically known but can be cached. MapBuffer.EntryentryAt(Integer offset)Provides parsed access to a MapBuffer without additional lookups for provided offset. MapBuffer.DataTypegetType(Integer key)Provides parsed DataType annotation associated with the given key. IntegergetInt(Integer key)Provides parsed Int value if the entry for given key exists with DataType. DoublegetDouble(Integer key)Provides parsed Double value if the entry for given key exists with DataType. StringgetString(Integer key)Provides parsed String value if the entry for given key exists with DataType. BooleangetBoolean(Integer key)Provides parsed Boolean value if the entry for given key exists with DataType. ReadableMapBuffergetMapBuffer(Integer key)Provides parsed MapBuffer value if the entry for given key exists with DataType. IntegerhashCode()Booleanequals(Object other)StringtoString()Iterator<MapBuffer.Entry>iterator()-
-
Method Detail
-
contains
Boolean contains(Integer key)
Checks whether entry for given key exists in MapBuffer.
- Parameters:
key- key to lookup the entry
-
getKeyOffset
Integer getKeyOffset(Integer key)
Provides offset of the key to use for entryAt, for cases when offset is not statically known but can be cached.
- Parameters:
key- key to lookup offset for
-
entryAt
MapBuffer.Entry entryAt(Integer offset)
Provides parsed access to a MapBuffer without additional lookups for provided offset.
- Parameters:
offset- offset of entry in the MapBuffer structure.
-
getType
MapBuffer.DataType getType(Integer key)
Provides parsed DataType annotation associated with the given key.
- Parameters:
key- key to lookup type for
-
getInt
Integer getInt(Integer key)
Provides parsed Int value if the entry for given key exists with DataType.INT type
- Parameters:
key- key to lookup Int value for
-
getDouble
Double getDouble(Integer key)
Provides parsed Double value if the entry for given key exists with DataType.DOUBLE type
- Parameters:
key- key to lookup Double value for
-
getString
String getString(Integer key)
Provides parsed String value if the entry for given key exists with DataType.STRING type
- Parameters:
key- key to lookup String value for
-
getBoolean
Boolean getBoolean(Integer key)
Provides parsed Boolean value if the entry for given key exists with DataType.BOOL type
- Parameters:
key- key to lookup Boolean value for
-
getMapBuffer
ReadableMapBuffer getMapBuffer(Integer key)
Provides parsed MapBuffer value if the entry for given key exists with DataType.MAP type
- Parameters:
key- key to lookup MapBuffer value for
-
iterator
Iterator<MapBuffer.Entry> iterator()
-
-
-
-