codesimian
Class SetEqual.SetL

java.lang.Object
  extended by codesimian.CS<CSGeneric>
      extended by codesimian.DefaultCS
          extended by codesimian.SetEqual
              extended by codesimian.SetEqual.SetL
All Implemented Interfaces:
CodeSimian
Enclosing class:
SetEqual

public static class SetEqual.SetL
extends SetEqual

Like the other SetX functions, param0 is target and param1 is source.
param1 is cast to Object and param0 is set using that Object's runtime type.
To set using an interface instead of a class, execute using SetL.L(Class interfaceName).


Nested Class Summary
 
Nested classes/interfaces inherited from class codesimian.SetEqual
SetEqual.DivideEqual, SetEqual.EqualP, SetEqual.MinusEqual, SetEqual.MultiplyEqual, SetEqual.PlusEqual, SetEqual.SetB, SetEqual.SetC, SetEqual.SetD, SetEqual.SetF, SetEqual.SetI, SetEqual.SetJ, SetEqual.SetL, SetEqual.SetS, SetEqual.SetZ, SetEqual.XEqual
 
Field Summary
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS
 
Constructor Summary
SetEqual.SetL()
           
 
Method Summary
 double cost()
          cost() should be changed to return a float, and should be renamed to costToExecute()

cost of EXECUTING this CS, not including any CSs it executes recursively.
 double DForProxy()
          Same as LForProxy() except returns 0 instead of throwing CSCastException.
 double interpretAsDouble(java.lang.Object anyObject)
          if SetL is interpreted as a number, by DForProxy for example, it needs to be able to convert Objects to numbers.
 java.lang.String keyword()
          For the CodeSimian language as a String.
CodeSimian language keyword, like "+" "*" "max" ">" etc.

Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add.

Some CSs might never be intended to be used in the language by their keyword.
The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()".
 java.lang.Object LForProxy(java.lang.Class c)
          Returns the Object that param0 is set to.
 
Methods inherited from class codesimian.SetEqual
minP, parsePriority
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, description, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setPType, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, L, L, L, L, L, maxD, maxP, minD, overwrites, parent, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetEqual.SetL

public SetEqual.SetL()
Method Detail

DForProxy

public double DForProxy()
Same as LForProxy() except returns 0 instead of throwing CSCastException. Returns interpretAsDouble(param1's Object) if sets param0 correctly to param1's Object value.

Specified by:
DForProxy in class DefaultCS

LForProxy

public java.lang.Object LForProxy(java.lang.Class c)
Returns the Object that param0 is set to. The Object is obtained from param1.L(Class)

Overrides:
LForProxy in class DefaultCS
See Also:
execProxy(), setExecProxy(CS)

cost

public double cost()
Description copied from class: CS
cost() should be changed to return a float, and should be renamed to costToExecute()

cost of EXECUTING this CS, not including any CSs it executes recursively. The INTERNAL cost.

One unit of myFuel() costs cost() units of fuel(). Beware of CSs that counterfeit fuel.

Returns 1 by default.

Overrides:
cost in class CS

keyword

public java.lang.String keyword()
Description copied from class: DefaultCS
For the CodeSimian language as a String.
CodeSimian language keyword, like "+" "*" "max" ">" etc.

Override this function if you want to specify a keyword other than how I derive them from the class name, like + for Add.

Some CSs might never be intended to be used in the language by their keyword.
The best example (4/05) is Num, because it is used in the language like "3.4" instead of "num()".
Default: Returns class name, minus package name (and its dots), and change the first letter to lowercase.

For example, CS.MaxParams does not override keyword(), which returns "maxP".

Overrides:
keyword in class DefaultCS
See Also:
CS.parent(), CS.newInstance(), CS.name()

interpretAsDouble

public double interpretAsDouble(java.lang.Object anyObject)
if SetL is interpreted as a number, by DForProxy for example, it needs to be able to convert Objects to numbers. Returns 1.0 if anyObject is not a Number or CS.