codesimian
Class Types.FALSE

java.lang.Object
  extended by codesimian.CS
      extended by codesimian.IndependentCS
          extended by codesimian.Types.FALSE
All Implemented Interfaces:
CodeSimian
Enclosing class:
Types

public static class Types.FALSE
extends IndependentCS

my params are illusions. I always return 0 or false. Use this type to prevent something from changing.


Field Summary
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS
 
Constructor Summary
Types.FALSE()
           
 
Method Summary
 double D()
          Execute this CS and cast to double.
 java.lang.String keyword()
          Returns the keyword of this CS or (after more code is finished) returns parent().name();

Keyword() needs to be removed.
 int maxP()
          Maximum quantity of Params
 int minP()
          Minimum quantity of Params.
 java.lang.String name()
          cant change this name because that would require a String variable and IndependentCS must use very little memory.
 CS P(int index)
          Returns a CS from this list with specific index.
 boolean setP(int index, CS value)
          Every CS is a list of other CSs, between size minP() and maxP() inclusive.
 boolean Z()
           
 
Methods inherited from class codesimian.IndependentCS
B, BForProxy, C, CForProxy, countP, decrementMyFuel, deleteP, description, DForProxy, F, FForProxy, fuel, getExec, heap, I, IForProxy, insertD, insertL, insertL, insertL1, insertP, J, JForProxy, L, L, LForProxy, LForProxy, myFuel, newInstance, parent, prevD, prevL, PType, S, setD, setD, setFuel, setL, setL, setL, setL1, setMyFuel, setPrevExec, SForProxy, toString, V, VForProxy, ZForProxy
 
Methods inherited from class codesimian.CS
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, clone, cost, deleteP, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, getObject, GETS, GETZ, indexP, indexPName, insertB, insertC, insertF, insertI, insertJ, insertS, insertZ, isIllusion, L, L, L, maxD, minD, overwrites, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setB, setC, SETC, setC, setCost, SETD, setDescription, setExec, setF, SETF, setF, setHeap, setI, SETI, setI, setJ, setJ, SETJ, SETL, setL, setL, setName, setObject, setParent, setParsePriority, setProxyOf, setPType, setS, setS, SETS, setTester, setZ, SETZ, setZ, tester, toJavaCode, voidReflect
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Types.FALSE

public Types.FALSE()
Method Detail

Z

public boolean Z()
Overrides:
Z in class IndependentCS
See Also:
execute this CS and cast to boolean. By default, all positive numbers are true, 0 & neg false. Its called Z because B is used by byte, and java.lang.Class.name() uses Z for boolean. All the functions that execute a CS have names equal to one of java.lang.Class.name();

D

public double D()
Description copied from class: CS
Execute this CS and cast to double. All subclasses should override DForProxy() instead of D().

Overrides:
D in class IndependentCS
See Also:
CS.L(java.lang.Class)

setP

public boolean setP(int index,
                    CS value)
Description copied from class: CS
Every CS is a list of other CSs, between size minP() and maxP() inclusive. setP overwrites one of those CSs or adds a new one at the end, depending on the index. If index is between 0 and countP()-1, overwrites. If it equals countP(), adds at end.

Overrides:
setP in class IndependentCS

minP

public int minP()
Description copied from class: CS
Minimum quantity of Params. countP() may be below minP() only a short time during compiling, and you must not EXECUTE this CS during that time or you risk an error. TODO: 9/07 that has become a problem with some classes like S, which calls x.C() when x is added, but x may have been added during compiling when x.countP() < x.minP().

Overrides:
minP in class IndependentCS

maxP

public int maxP()
Description copied from class: CS
Maximum quantity of Params

Overrides:
maxP in class IndependentCS

P

public CS P(int index)
Description copied from class: CS
Returns a CS from this list with specific index. Every CS is a list of other CSs, each with an index between 0 and countP()-1. The quantity of CSs in the list is countP(), which should be between minP() and maxP() inclusive. Errors could occur if quantity is outside that range when this CS is EXECUTED.

There can also be CSs at negative indexs. Maps some negative indexs to the HEAP:
If x <= -2 then CS.P(x) returns CS.heap().P(-x). Index -1 returns NULL.

Overrides:
P in class IndependentCS
Parameters:
index - range 0 (or neg?) to countP()-1 inclusive
See Also:
CS.heap()

keyword

public java.lang.String keyword()
Description copied from class: CS
Returns the keyword of this CS or (after more code is finished) returns parent().name();

Keyword() needs to be removed. Keyword() can only be removed from CS.java when the primary way to instantiate the default CS types is by using newInstance() on one of the CSs in a list of default CSs.

When you instantiate someCS with someCS.parent().newInstance(), someCS.keyword() can be replaced by someCS.parent().name().

keyword() appears in the code hundreds of times. Be careful when refactoring it out.

There is intentionally no setKeyword(String) in this interface. Dont add it.

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

name

public java.lang.String name()
Description copied from class: IndependentCS
cant change this name because that would require a String variable and IndependentCS must use very little memory. Like CS, this class has no variables.

Overrides:
name in class IndependentCS