fipaos.skill.constraint.ccl.variable
Class List


public class List


This class handles the creation and parsing of a List or Set.
It converts between a Vector and a String in the following formats:

{ blue, red, green}
{(car, blue), (boat, red)}

It converts these into a set of elements based on the strings
separated by commas.

For instance the first List above becomes the Vector [ blue, red, green]


Field Summary
 final static StringCLOSE_BRACKET
           
 final static StringOPEN_BRACKET
           

Method Summary
 static voidmain(String[] args)
          
 static VectorparseList(String str)
          
Converts a String in a List format to a Vector of its elements.
 static StringtoString(Vector v)
          
Converts a Vector into a List represented as a String.

Field Detail

CLOSE_BRACKET

public final static String CLOSE_BRACKET

OPEN_BRACKET

public final static String OPEN_BRACKET
Method Detail

main

public static void main(String[] args)


parseList

public static Vector parseList(String str)

Converts a String in a List format to a Vector of its elements.
{ blue, red, green} -> Vector [ blue, red, green]

toString

public static String toString(Vector v)

Converts a Vector into a List represented as a String.
Vector [ blue, red, green] -> { blue, red, green}

Association Links

to Class java.lang.String

to Class java.lang.String