codesimian
Class SetEqual.SetL

java.lang.Object
  extended by codesimian.CS
      extended by codesimian.DefaultCS
          extended by codesimian.SetEqual
              extended by codesimian.SetEqual.SetL
All Implemented Interfaces:
CodeSimian, java.io.Serializable
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).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class codesimian.SetEqual
SetEqual.EqualP, SetEqual.SetB, SetEqual.SetC, SetEqual.SetD, SetEqual.SetF, SetEqual.SetI, SetEqual.SetJ, SetEqual.SetL, SetEqual.SetS, SetEqual.SetZ
 
Field Summary
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, FUEL, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER
 
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, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addP, addP, addP, addP, addP, BForProxy, CForProxy, clone, D, deleteP, FForProxy, IForProxy, isIllusion, javaCode, 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, setB, setC, setCost, setDescription, setF, setHeap, setI, setJ, setL, setL, setParent, setParsePriority, setProxyOf, setPType, setS, setTester, setZ, SForProxy, tester, 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.