AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.YailList Class Reference
Inheritance diagram for com.google.appinventor.components.runtime.util.YailList:
com.google.appinventor.components.runtime.util.YailObject< T >

Public Member Functions

 YailList ()
 
Object[] toArray ()
 
String[] toStringArray ()
 
String toJSONString ()
 
int size ()
 
String toString ()
 
String getString (int index)
 
Object getObject (int index)
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.util.YailObject< T >
boolean isEmpty ()
 
Iterator< T > iterator ()
 

Static Public Member Functions

static YailList makeEmptyList ()
 
static YailList makeList (Object[] objects)
 
static YailList makeList (List vals)
 
static YailList makeList (Collection vals)
 
static YailList makeList (Set vals)
 
static String YailListElementToString (Object element)
 

Detailed Description

The YailList is a wrapper around the gnu.list.Pair class used by the Kawa framework. YailList is the main list primitive used by App Inventor components.

Definition at line 26 of file YailList.java.

Constructor & Destructor Documentation

◆ YailList()

com.google.appinventor.components.runtime.util.YailList.YailList ( )

Create an empty YailList.

Definition at line 41 of file YailList.java.

Member Function Documentation

◆ getObject()

Object com.google.appinventor.components.runtime.util.YailList.getObject ( int  index)

Return the Object at the given index.

Implements com.google.appinventor.components.runtime.util.YailObject< T >.

Definition at line 200 of file YailList.java.

◆ getString()

String com.google.appinventor.components.runtime.util.YailList.getString ( int  index)

Return the String at the given index.

Definition at line 193 of file YailList.java.

◆ makeEmptyList()

static YailList com.google.appinventor.components.runtime.util.YailList.makeEmptyList ( )
static

Create an empty YailList YailList from an array.

Definition at line 52 of file YailList.java.

◆ makeList() [1/4]

static YailList com.google.appinventor.components.runtime.util.YailList.makeList ( Collection  vals)
static

Create a YailList from a Collection.

Definition at line 75 of file YailList.java.

◆ makeList() [2/4]

static YailList com.google.appinventor.components.runtime.util.YailList.makeList ( List  vals)
static

Create a YailList from a List.

Definition at line 67 of file YailList.java.

◆ makeList() [3/4]

static YailList com.google.appinventor.components.runtime.util.YailList.makeList ( Object[]  objects)
static

Create a YailList from an array.

Definition at line 59 of file YailList.java.

◆ makeList() [4/4]

static YailList com.google.appinventor.components.runtime.util.YailList.makeList ( Set  vals)
static

Create a YailList from a Set.

Definition at line 85 of file YailList.java.

◆ size()

int com.google.appinventor.components.runtime.util.YailList.size ( )

Return the size of this YailList.

Implements com.google.appinventor.components.runtime.util.YailObject< T >.

Definition at line 172 of file YailList.java.

◆ toArray()

Object [] com.google.appinventor.components.runtime.util.YailList.toArray ( )

Return this YailList as an array.

Definition at line 97 of file YailList.java.

◆ toJSONString()

String com.google.appinventor.components.runtime.util.YailList.toJSONString ( )

Return a strictly syntactically correct JSON text representation of this YailList. Only supports String, Number, Boolean, YailList, FString and arrays containing these types.

Definition at line 148 of file YailList.java.

◆ toString()

String com.google.appinventor.components.runtime.util.YailList.toString ( )

Return a String representation of this YailList.

Definition at line 180 of file YailList.java.

◆ toStringArray()

String [] com.google.appinventor.components.runtime.util.YailList.toStringArray ( )

Return this YailList as an array of Strings. In the case of numbers, we convert to strings using YailNumberToString for consistency with the other places where we convert Yail numbers for printing.

Definition at line 114 of file YailList.java.

◆ YailListElementToString()

static String com.google.appinventor.components.runtime.util.YailList.YailListElementToString ( Object  element)
static

Convert a YailList element to a string. This is the same as toString except in the case of numbers, which we convert to strings using YailNumberToString for consistency with the other places where we convert Yail numbers for printing.

Parameters
element
Returns
the string

Definition at line 131 of file YailList.java.


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