Java Doc for ExpressionCommand.java in  » Science » jcm1-source » edu » hws » jcm » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » jcm1 source » edu.hws.jcm.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


edu.hws.jcm.data.ExpressionCommand

All known Subclasses:   edu.hws.jcm.data.ConditionalExpression,  edu.hws.jcm.data.Constant,  edu.hws.jcm.functions.FunctionParserExtension,
ExpressionCommand
public interface ExpressionCommand extends java.io.Serializable(Code)
An ExpressionCommand can occur as a command in an ExpressionProgram. ExpressionCommands exists so that ExprssionPrograms can be extened to include new types of operations beyond the basic operations (such as PLUS and SIN) which are represented by constants in the ExpressionProgram class. Examples include ConditionalExpressions and user-defined functions. This interface is not meant for casual programmers. It is for programmers who want to extend the notion of Expression in an orginal way.




Method Summary
public  voidappendOutputString(ExpressionProgram prog, int myIndex, StringBuffer buffer)
     The ExpressionCommand occurs in the program prog at the index indicated by myIndex.
public  voidapply(StackOfDouble stack, Cases cases)
     This routine is called when an ExpressionCommand object is encountered during the evaluation of an ExpressionProgram.
public  voidcompileDerivative(ExpressionProgram prog, int myIndex, ExpressionProgram deriv, Variable wrt)
     The ExpressionCommand occurs in the program prog at the index indicated by myIndex. Add commands to deriv that will evaluate the derivative of this command with respect to the variable wrt.
public  booleandependsOn(Variable x)
     Return true if this command depends on the value of x, false otherwise.
public  intextent(ExpressionProgram prog, int myIndex)
     The ExpressionCommand occurs in the program prog at the index indicated by myIndex. Return the total number of indices in prog occupied by this command and the commands that generate data used by this command.
Parameters:
  prog - ExpressionProgram in which this ExpressionCommand occurs.
Parameters:
  myIndex - index at which ExpressionCommand occurs in prog.



Method Detail
appendOutputString
public void appendOutputString(ExpressionProgram prog, int myIndex, StringBuffer buffer)(Code)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex. Add a print string representation of the sub-expression represented by this command (including any previous commands in the program that generate data used by this command).



apply
public void apply(StackOfDouble stack, Cases cases)(Code)
This routine is called when an ExpressionCommand object is encountered during the evaluation of an ExpressionProgram. The stack may contain results of previous commands in the program. For example, for a ConditionalExpression, it contains the value of the boolean condition, and for a user-defined function, it contains the values of the arguments of the function. When apply() is called, the ExpressionCommand should perform any stack operations that are necessary to evaluate itself. For example, a user-defined function would remove its arguments from the stack and replace them with the value of the function at those arguments. If cases is non-null, then any case information generated during the evaluation should be recorded in cases. (See the Cases class for more information.)
Parameters:
  stack - contains results of previous commands in the program.
Parameters:
  cases - if non-null, any case information generated during evaluation should be recorded here.



compileDerivative
public void compileDerivative(ExpressionProgram prog, int myIndex, ExpressionProgram deriv, Variable wrt)(Code)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex. Add commands to deriv that will evaluate the derivative of this command with respect to the variable wrt. prog and myIndex are provided so that this routine will have access to any commands in prog that generate data used by this command (for example, the commands that evaluate the arguments of a user-defined function).
Parameters:
  prog - program in which ExpressionCommand occurs.
Parameters:
  myIndex - point at which ExpressionCommand occurs in the ExpressionProgram.
Parameters:
  deriv - the derivative of the ExpressionPorgram prog, which is in the process of being computed.Commands should added to deriv that will compute the derivative of this ExpressionCommand.
Parameters:
  wrt - commands are added to deriv with respect to this Variable.



dependsOn
public boolean dependsOn(Variable x)(Code)
Return true if this command depends on the value of x, false otherwise. That is, when apply() is called, can the result depend on the value of x?



extent
public int extent(ExpressionProgram prog, int myIndex)(Code)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex. Return the total number of indices in prog occupied by this command and the commands that generate data used by this command.
Parameters:
  prog - ExpressionProgram in which this ExpressionCommand occurs.
Parameters:
  myIndex - index at which ExpressionCommand occurs in prog. total number of indices in prog occupied by this command and commands that generate data used by this command.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.