Jatha Software

org.jatha.dynatype
Class LispValueFactory

java.lang.Object
  extended by org.jatha.dynatype.LispValueFactory

public class LispValueFactory
extends Object

As of Jatha 1.5.3, do not use this class. Use the non-static routines Jatha.makeXYZ() instead.

The LispValueFactory knows how to create values of different types. Make an instance of this class and use it to create instances of the types.

The only possible error is an OutOfMemoryError, which Java will generate on its own, so we don't do any error checking. Example:
   LispValueFactory vf = new LispValueFactory();
   LispValue         x = vf.makeCons(NIL, NIL);
 

See Also:
LispValue

Constructor Summary
LispValueFactory()
           
 
Method Summary
static LispConsOrNil makeAppendList(Jatha lisp, Collection elements)
          Deprecated. Use the same method on the Jatha class instead
static LispBignum makeBignum(Jatha lisp, BigInteger value)
          Deprecated. Use the same method on the Jatha class instead
static LispBignum makeBignum(Jatha lisp, double value)
          Deprecated. Use the same method on the Jatha class instead
static LispBignum makeBignum(Jatha lisp, LispInteger value)
          Deprecated. Use the same method on the Jatha class instead
static LispBignum makeBignum(Jatha lisp, long value)
          Deprecated. Use the same method on the Jatha class instead
static LispCons makeCons(Jatha lisp, LispValue theCar, LispValue theCdr)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeConstant(Jatha lisp, LispString symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeConstant(Jatha lisp, String symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispInteger makeInteger(Jatha lisp)
          Deprecated. Use the same method on the Jatha class instead
static LispInteger makeInteger(Jatha lisp, int value)
          Deprecated. Use the same method on the Jatha class instead
static LispInteger makeInteger(Jatha lisp, Integer value)
          Deprecated. Use the same method on the Jatha class instead
static LispInteger makeInteger(Jatha lisp, long value)
          Deprecated. Use the same method on the Jatha class instead
static LispInteger makeInteger(Jatha lisp, Long value)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeKeyword(Jatha lisp, LispString symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeKeyword(Jatha lisp, String symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispConsOrNil makeList(Jatha lisp, Collection elements)
          Deprecated. Use the same method on the Jatha class instead
static LispCons makeList(Jatha lisp, LispValue first)
          Deprecated. Use the same method on the Jatha class instead
static LispCons makeList(Jatha lisp, LispValue first, LispValue second)
          Deprecated. Use the same method on the Jatha class instead
static LispCons makeList(Jatha lisp, LispValue first, LispValue second, LispValue third)
          Deprecated. Use the same method on the Jatha class instead
static LispCons makeList(Jatha lisp, LispValue first, LispValue second, LispValue third, LispValue fourth)
          Deprecated. Use the same method on the Jatha class instead
static LispConsOrNil makeNconcList(Jatha lisp, Collection elements)
          Deprecated. Use the same method on the Jatha class instead
static StandardLispNIL makeNIL(Jatha lisp, LispString symbolName)
          Deprecated. Use the same method on the Jatha class instead
static StandardLispNIL makeNIL(Jatha lisp, String symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispReal makeReal(Jatha lisp)
          Deprecated. Use the same method on the Jatha class instead
static LispReal makeReal(Jatha lisp, double value)
          Deprecated. Use the same method on the Jatha class instead
static LispReal makeReal(Jatha lisp, Double value)
          Deprecated. Use the same method on the Jatha class instead
static LispReal makeReal(Jatha lisp, float value)
          Deprecated. Use the same method on the Jatha class instead
static LispReal makeReal(Jatha lisp, Float value)
          Deprecated. Use the same method on the Jatha class instead
static LispString makeString(Jatha lisp, String str)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeSymbol(Jatha lisp, LispString symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispSymbol makeSymbol(Jatha lisp, String symbolName)
          Deprecated. Use the same method on the Jatha class instead
static LispValue toLisp(Jatha lisp, Object obj)
          Deprecated. Use the same method on the Jatha class instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LispValueFactory

public LispValueFactory()
Method Detail

makeCons

public static LispCons makeCons(Jatha lisp,
                                LispValue theCar,
                                LispValue theCdr)
Deprecated. Use the same method on the Jatha class instead

makeCons(a,b) creates a new Cons cell, initialized with the values a and b as the CAR and CDR respectively.

Parameters:
theCar -
theCdr -
Returns:
LispValue
See Also:
LispCons

makeList

public static LispConsOrNil makeList(Jatha lisp,
                                     Collection elements)
Deprecated. Use the same method on the Jatha class instead

Creates a LISP list from the elements of the Collection. which must be LispValue types.

See Also:
LispValue

makeList

public static LispCons makeList(Jatha lisp,
                                LispValue first)
Deprecated. Use the same method on the Jatha class instead

Creates a list of the 1, 2 or 3 or 4 item parameters, and returns it.

See Also:
LispCons, LispValue

makeList

public static LispCons makeList(Jatha lisp,
                                LispValue first,
                                LispValue second)
Deprecated. Use the same method on the Jatha class instead


makeList

public static LispCons makeList(Jatha lisp,
                                LispValue first,
                                LispValue second,
                                LispValue third)
Deprecated. Use the same method on the Jatha class instead


makeList

public static LispCons makeList(Jatha lisp,
                                LispValue first,
                                LispValue second,
                                LispValue third,
                                LispValue fourth)
Deprecated. Use the same method on the Jatha class instead


makeAppendList

public static LispConsOrNil makeAppendList(Jatha lisp,
                                           Collection elements)
Deprecated. Use the same method on the Jatha class instead

Each element of the collection should be a LispConsOrNil. The elements will be non-destructively appended to each other. The result is one list. Note that this operation is expensive in terms of storage.


makeNconcList

public static LispConsOrNil makeNconcList(Jatha lisp,
                                          Collection elements)
Deprecated. Use the same method on the Jatha class instead

Each element of the collection should be a LispConsOrNil. The elements will be destructively appended to each other. The result is one list.


makeInteger

public static LispInteger makeInteger(Jatha lisp,
                                      Long value)
Deprecated. Use the same method on the Jatha class instead

Creates a LispInteger type initialized with the value provided and returns it.

Returns:
LispInteger
See Also:
LispInteger, LispValue

makeInteger

public static LispInteger makeInteger(Jatha lisp,
                                      long value)
Deprecated. Use the same method on the Jatha class instead


makeInteger

public static LispInteger makeInteger(Jatha lisp,
                                      Integer value)
Deprecated. Use the same method on the Jatha class instead


makeInteger

public static LispInteger makeInteger(Jatha lisp,
                                      int value)
Deprecated. Use the same method on the Jatha class instead


makeInteger

public static LispInteger makeInteger(Jatha lisp)
Deprecated. Use the same method on the Jatha class instead


makeBignum

public static LispBignum makeBignum(Jatha lisp,
                                    BigInteger value)
Deprecated. Use the same method on the Jatha class instead

Creates a LispBignum type initialized with the value provided.

See Also:
LispBignum, BigInteger

makeBignum

public static LispBignum makeBignum(Jatha lisp,
                                    LispInteger value)
Deprecated. Use the same method on the Jatha class instead


makeBignum

public static LispBignum makeBignum(Jatha lisp,
                                    double value)
Deprecated. Use the same method on the Jatha class instead


makeBignum

public static LispBignum makeBignum(Jatha lisp,
                                    long value)
Deprecated. Use the same method on the Jatha class instead


makeReal

public static LispReal makeReal(Jatha lisp,
                                Double value)
Deprecated. Use the same method on the Jatha class instead

Creates an instance of LispReal initialized with the given value.

Returns:
LispReal
See Also:
LispInteger, LispValue

makeReal

public static LispReal makeReal(Jatha lisp,
                                double value)
Deprecated. Use the same method on the Jatha class instead


makeReal

public static LispReal makeReal(Jatha lisp,
                                Float value)
Deprecated. Use the same method on the Jatha class instead


makeReal

public static LispReal makeReal(Jatha lisp,
                                float value)
Deprecated. Use the same method on the Jatha class instead


makeReal

public static LispReal makeReal(Jatha lisp)
Deprecated. Use the same method on the Jatha class instead


makeString

public static LispString makeString(Jatha lisp,
                                    String str)
Deprecated. Use the same method on the Jatha class instead

Creates a LispString from a Java string.

Returns:
LispString
See Also:
LispString, LispValue

makeSymbol

public static LispSymbol makeSymbol(Jatha lisp,
                                    String symbolName)
Deprecated. Use the same method on the Jatha class instead

Creates a LispSymbol from a string or LispString. This method does not intern the symbol.

Returns:
LispSymbol
See Also:
LispSymbol, LispValue

makeSymbol

public static LispSymbol makeSymbol(Jatha lisp,
                                    LispString symbolName)
Deprecated. Use the same method on the Jatha class instead


makeConstant

public static LispSymbol makeConstant(Jatha lisp,
                                      String symbolName)
Deprecated. Use the same method on the Jatha class instead

Creates a LispConstant (a type of Symbol whose value can not be changed). This method does not intern the symbol.

Returns:
LispSymbol
See Also:
LispConstant, LispSymbol, LispValue

makeConstant

public static LispSymbol makeConstant(Jatha lisp,
                                      LispString symbolName)
Deprecated. Use the same method on the Jatha class instead


makeKeyword

public static LispSymbol makeKeyword(Jatha lisp,
                                     String symbolName)
Deprecated. Use the same method on the Jatha class instead

Creates a LispKeyword (a type of Symbol that evaluates to itself). This method does not intern the symbol.

Returns:
LispSymbol
See Also:
LispKeyword, LispConstant, LispSymbol, LispValue

makeKeyword

public static LispSymbol makeKeyword(Jatha lisp,
                                     LispString symbolName)
Deprecated. Use the same method on the Jatha class instead


makeNIL

public static StandardLispNIL makeNIL(Jatha lisp,
                                      String symbolName)
Deprecated. Use the same method on the Jatha class instead

Creates a LispNil (the funny symbol/cons that is the LISP NIL). This method does not intern the symbol.

Returns:
LispSymbol
See Also:
StandardLispNIL, LispCons, LispSymbol, LispValue

makeNIL

public static StandardLispNIL makeNIL(Jatha lisp,
                                      LispString symbolName)
Deprecated. Use the same method on the Jatha class instead


toLisp

public static LispValue toLisp(Jatha lisp,
                               Object obj)
Deprecated. Use the same method on the Jatha class instead

Turns a Java object into a LISP object.

Parameters:
obj -

Jatha Software