-
- 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 class
ReadableMapBuffer.Companion
-
Method Summary
Modifier and Type Method Description Integer
getCount()
Number of elements inserted into current MapBuffer. Unit
setCount(Integer count)
Boolean
contains(Integer key)
Checks whether entry for given key exists in MapBuffer. 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. MapBuffer.Entry
entryAt(Integer offset)
Provides parsed access to a MapBuffer without additional lookups for provided offset. MapBuffer.DataType
getType(Integer key)
Provides parsed DataType annotation associated with the given key. Integer
getInt(Integer key)
Provides parsed Int value if the entry for given key exists with DataType. Double
getDouble(Integer key)
Provides parsed Double value if the entry for given key exists with DataType. String
getString(Integer key)
Provides parsed String value if the entry for given key exists with DataType. Boolean
getBoolean(Integer key)
Provides parsed Boolean value if the entry for given key exists with DataType. ReadableMapBuffer
getMapBuffer(Integer key)
Provides parsed MapBuffer value if the entry for given key exists with DataType. Integer
hashCode()
Boolean
equals(Object other)
String
toString()
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()
-
-
-
-