List::create Method

Creates a list from the container obtained from a prior call to the List.pack method.

Syntax

client server public static List create(container container)

Run On

Called

Parameters

  • container
    Type: container
    The container that holds the packed list.

Return Value

Type: List Class
A list identical to the one that was packed into the container.

Examples

The following example creates a list and packs it into a container. The create method is then used to unpack the container and create a list identical to the original one.

{ 
    List il = new List(Types::Integer); 
    List newList; 
    container packedList; 
    // Add some elements 
    il.addEnd(1); 
    il.addEnd(2); 
    il.addEnd(3); 
  
    // Pack the list into a container 
    packedList = il.pack(); 
    newList = list::create(packedList); 
 
    // Prints <1, 2, 3> 
    print newList.toString(); 
    pause; 
}

See Also

List Class

List.pack Method