📄 deladdforall.html
字号:
<P><DL></DL></DL><HR><A NAME="classCnt"><!-- --></A><H3>classCnt</H3><PRE>private static int <B>classCnt</B></PRE><DL><DD>The number of objects already instantiated from this class.<P><DL></DL></DL><HR><A NAME="cnt"><!-- --></A><H3>cnt</H3><PRE>private int <B>cnt</B></PRE><DL><DD>The number of objects already instantiated from this class before this object was instantiated. This is used as a unique identifier for this object to distinguish it from the other objects of this class.<P><DL></DL></DL><HR><A NAME="exp"><!-- --></A><H3>exp</H3><PRE>private <A HREF="../JSHOP2/LogicalExpression.html" title="class in JSHOP2">LogicalExpression</A> <B>exp</B></PRE><DL><DD>The precondtion of the <code>ForAll</code> statement at compile time is represented by this variable.<P><DL></DL></DL><HR><A NAME="pre"><!-- --></A><H3>pre</H3><PRE>private <A HREF="../JSHOP2/Precondition.html" title="class in JSHOP2">Precondition</A> <B>pre</B></PRE><DL><DD>The precondtion of the <code>ForAll</code> statement at run time is represented by this variable.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="DelAddForAll(JSHOP2.LogicalExpression, java.util.Vector)"><!-- --></A><H3>DelAddForAll</H3><PRE>public <B>DelAddForAll</B>(<A HREF="../JSHOP2/LogicalExpression.html" title="class in JSHOP2">LogicalExpression</A> expIn, java.util.Vector<<A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A>> atomsIn)</PRE><DL><DD>To initialize this <code>ForAll</code> delete/add element at compile time.<P><DL><DT><B>Parameters:</B><DD><CODE>expIn</CODE> - the logical expression to be the precondition of this <code>ForAll</code> delete/add element.<DD><CODE>atomsIn</CODE> - the atoms to be added/deleted as a <code>Vector</code>. Note that we use a <code>Vector</code> rather than an array at compile time because at compile time we do not know how many atoms there will be.</DL></DL><HR><A NAME="DelAddForAll(JSHOP2.Precondition, JSHOP2.Predicate[])"><!-- --></A><H3>DelAddForAll</H3><PRE>public <B>DelAddForAll</B>(<A HREF="../JSHOP2/Precondition.html" title="class in JSHOP2">Precondition</A> preIn, <A HREF="../JSHOP2/Predicate.html" title="class in JSHOP2">Predicate</A>[] atomsIn)</PRE><DL><DD>To initialize this <code>ForAll</code> delete/add element at run time.<P><DL><DT><B>Parameters:</B><DD><CODE>preIn</CODE> - the logical expression to be the precondition of this <code>ForAll</code> delete/add element.<DD><CODE>atomsIn</CODE> - the atoms to be added/deleted as an array. Note that we use an array rather than a <code>Vector</code> at run time because at run time we know how many atoms there will be.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="add(JSHOP2.State, JSHOP2.Term[], java.util.Vector[])"><!-- --></A><H3>add</H3><PRE>public void <B>add</B>(<A HREF="../JSHOP2/State.html" title="class in JSHOP2">State</A> s, <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A>[] binding, java.util.Vector[] delAddList)</PRE><DL><DD>To add the atoms of this <code>ForAll</code> delete/add element to the current state of the world.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../JSHOP2/DelAddElement.html#add(JSHOP2.State, JSHOP2.Term[], java.util.Vector[])">add</A></CODE> in class <CODE><A HREF="../JSHOP2/DelAddElement.html" title="class in JSHOP2">DelAddElement</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the current state of the world.<DD><CODE>binding</CODE> - the binding to be applied before adding the element.<DD><CODE>delAddList</CODE> - an array of size 4 of atoms and protections deleted and added. This is useful when a backtrack happens: Added atoms and protections are retracted, and deleted atoms and protections are added back to change the state of the world to what it was before backtracked decision was made. The 4 elements of the array are the deleted atoms, the added atoms, the deleted protections, and the added protections repectively.</DL></DD></DL><HR><A NAME="del(JSHOP2.State, JSHOP2.Term[], java.util.Vector[])"><!-- --></A><H3>del</H3><PRE>public boolean <B>del</B>(<A HREF="../JSHOP2/State.html" title="class in JSHOP2">State</A> s, <A HREF="../JSHOP2/Term.html" title="class in JSHOP2">Term</A>[] binding, java.util.Vector[] delAddList)</PRE><DL><DD>To delete the atoms of this <code>ForAll</code> delete/add element from the current state of the world.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../JSHOP2/DelAddElement.html#del(JSHOP2.State, JSHOP2.Term[], java.util.Vector[])">del</A></CODE> in class <CODE><A HREF="../JSHOP2/DelAddElement.html" title="class in JSHOP2">DelAddElement</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the current state of the world.<DD><CODE>binding</CODE> - the binding to be applied before deleting the element.<DD><CODE>delAddList</CODE> - an array of size 4 of atoms and protections deleted and added. This is useful when a backtrack happens: Added atoms and protections are retracted, and deleted atoms and protections are added back to change the state of the world to what it was before backtracked decision was made. The 4 elements of array are the the deleted atoms, added atoms, deleted protections and added protections in that order.<DT><B>Returns:</B><DD><code>true</code> if the atom(s) associated with this delete/add element were deleted, <code>false</code> otherwise, i.e., when at least one of the atoms to be deleted was protected. If this function returns <code>false</code>, it means the operator has failed and should be backtracked.</DL></DD></DL><HR><A NAME="getExpCode()"><!-- --></A><H3>getExpCode</H3><PRE>public java.lang.String <B>getExpCode</B>()</PRE><DL><DD>This function produces Java code that initializes some data structures that will be needed to create the precondition object that implements the precondition of this <code>ForAll</code> delete/add element at run time.<P><DD><DL><DT><B>Returns:</B><DD>the produced code as a <code>String</code>.</DL></DD></DL><HR><A NAME="getInitCode()"><!-- --></A><H3>getInitCode</H3><PRE>public java.lang.String <B>getInitCode</B>()</PRE><DL><DD>This function produces Java code used to initialize an array of type predicate this <code>ForAll</code> delete/add element will use at run time to represent the atoms that will be deleted/added by this element. It also produces the code to set the current unifier for the precondition of this element to an empty one (i.e., an array of <code>null</code> elements, because when this precondition is created there is still no binding to be applied to it.<P><DD><DL><DT><B>Returns:</B><DD>the Java code as a <code>String</code>.</DL></DD></DL><HR><A NAME="setVarCount(int)"><!-- --></A><H3>setVarCount</H3><PRE>public void <B>setVarCount</B>(int varCount)</PRE><DL><DD>To set the number of variables in this <code>ForAll</code> delete/add element.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../JSHOP2/DelAddElement.html#setVarCount(int)">setVarCount</A></CODE> in class <CODE><A HREF="../JSHOP2/DelAddElement.html" title="class in JSHOP2">DelAddElement</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>varCount</CODE> - the number of variables.</DL></DD></DL><HR><A NAME="toCode()"><!-- --></A><H3>toCode</H3><PRE>public java.lang.String <B>toCode</B>()</PRE><DL><DD>This function produces Java code to create this <code>ForAll</code> delete/add element.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../JSHOP2/CompileTimeObject.html#toCode()">toCode</A></CODE> in class <CODE><A HREF="../JSHOP2/CompileTimeObject.html" title="class in JSHOP2">CompileTimeObject</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the produced code as a <code>String</code>.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../JSHOP2/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../JSHOP2/DelAddElement.html" title="class in JSHOP2"><B>PREV CLASS</B></A> <A HREF="../JSHOP2/DelAddProtection.html" title="class in JSHOP2"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html?JSHOP2/DelAddForAll.html" target="_top"><B>FRAMES</B></A> <A HREF="DelAddForAll.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -