android.util.SparseArray with the minimal API
for storing FieldData objects.
This class is an internal implementation detail of nano and should not
be called directly by clients.
Based on android.support.v4.util.SpareArrayCompat.
| Modifier and Type | Field and Description |
|---|---|
| private static final FieldData | |
| private FieldData[] | |
| private int[] | |
| private boolean | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | FieldArray(int initialCapacity)
Creates a new FieldArray containing no mappings that will not require any additional memory allocation to store the specified number of mappings. |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private boolean | |
| private int | |
| public final FieldArray | |
| pack-priv FieldData | dataAt(int index)
Given an index in the range |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| private void | |
| pack-priv FieldData | get(int fieldNumber)
Gets the FieldData mapped from the specified fieldNumber, or |
| public int | |
| private int | |
| private int | |
| public boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv int |
| DELETED | back to summary |
|---|---|
| private static final FieldData DELETED | |
| mData | back to summary |
|---|---|
| private FieldData[] mData | |
| mFieldNumbers | back to summary |
|---|---|
| private int[] mFieldNumbers | |
| mGarbage | back to summary |
|---|---|
| private boolean mGarbage | |
| mSize | back to summary |
|---|---|
| private int mSize | |
| FieldArray | back to summary |
|---|---|
| pack-priv FieldArray() Creates a new FieldArray containing no fields. | |
| FieldArray | back to summary |
|---|---|
| pack-priv FieldArray(int initialCapacity) Creates a new FieldArray containing no mappings that will not require any additional memory allocation to store the specified number of mappings. | |
| arrayEquals | back to summary |
|---|---|
| private boolean arrayEquals(int[] a, int[] b, int size) | |
| arrayEquals | back to summary |
|---|---|
| private boolean arrayEquals(FieldData[] a, FieldData[] b, int size) | |
| binarySearch | back to summary |
|---|---|
| private int binarySearch(int value) | |
| clone | back to summary |
|---|---|
| public final FieldArray clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| dataAt | back to summary |
|---|---|
| pack-priv FieldData dataAt(int index) Given an index in the range | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| gc | back to summary |
|---|---|
| private void gc() | |
| get | back to summary |
|---|---|
| pack-priv FieldData get(int fieldNumber) Gets the FieldData mapped from the specified fieldNumber, or | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| idealByteArraySize | back to summary |
|---|---|
| private int idealByteArraySize(int need) | |
| idealIntArraySize | back to summary |
|---|---|
| private int idealIntArraySize(int need) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| put | back to summary |
|---|---|
| pack-priv void put(int fieldNumber, FieldData data) Adds a mapping from the specified fieldNumber to the specified data, replacing the previous mapping if there was one. | |
| remove | back to summary |
|---|---|
| pack-priv void remove(int fieldNumber) Removes the data from the specified fieldNumber, if there was any. | |
| size | back to summary |
|---|---|
| pack-priv int size() Returns the number of key-value mappings that this FieldArray currently stores. | |