AI2 Component
(Version nb184)
|
Public Member Functions | |
Object | getObject (int index) |
int | size () |
boolean | isEmpty () |
Iterator< T > | iterator () |
YailObject is a marker interface for data types defined by YAIL. Currently, that is YailList and YailDictionary. Any new non-primitive data types should also implement YailObject.
Definition at line 19 of file YailObject.java.
Object com.google.appinventor.components.runtime.util.YailObject< T >.getObject | ( | int | index | ) |
Get the object at the given index. The index is 0-based.
index | The index of the object to retrieve. |
IndexOutOfBoundsException | if the index is less than zero or greater than or equal to the size() of the object. |
Implemented in com.google.appinventor.components.runtime.util.YailList.
boolean com.google.appinventor.components.runtime.util.YailObject< T >.isEmpty | ( | ) |
Test whether the object is empty.
Iterator<T> com.google.appinventor.components.runtime.util.YailObject< T >.iterator | ( | ) |
Returns an iterator over the elements in the YailObject. For YailList this may be any other YAIL type and for YailDictionary this is always YailList.
int com.google.appinventor.components.runtime.util.YailObject< T >.size | ( | ) |
Get the size of the object. The exact semantics depend on the object, but typically this should be the number of elements in the object. For lists, it is the length of the list and for dictionaries it is the size of the dictionary (number of pairs). Ideally this method should be constant time.
Implemented in com.google.appinventor.components.runtime.util.YailList.