AI2 Component  (Version nb184)< T > Interface Template Reference
Inheritance diagram for< T >:

Public Member Functions

Object getObject (int index)
int size ()
boolean isEmpty ()
Iterator< T > iterator ()

Detailed Description

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.

Author (Evan W. Patton)

Definition at line 19 of file

Member Function Documentation

◆ getObject()

Object< T >.getObject ( int  index)

Get the object at the given index. The index is 0-based.

indexThe index of the object to retrieve.
An object dependent on the implementation. The returned object should be coercible to another YAIL type.
IndexOutOfBoundsExceptionif the index is less than zero or greater than or equal to the size() of the object.

Implemented in

◆ isEmpty()

Test whether the object is empty.

True if the object is empty, otherwise false.

◆ 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.

◆ 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.

The size of the object.

Implemented in

The documentation for this interface was generated from the following file: