OSDN Git Service

lejos_NXJ_win32_0_5_0beta.zip
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / docs / apidocs / lejos / util / Assertion.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.5.0_09) on Tue Jan 08 20:46:02 GMT 2008 -->
6 <TITLE>
7 Assertion (leJOS NXT API documentation)
8 </TITLE>
9
10 <META NAME="keywords" CONTENT="lejos.util.Assertion class">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17     parent.document.title="Assertion (leJOS NXT API documentation)";
18 }
19 </SCRIPT>
20 <NOSCRIPT>
21 </NOSCRIPT>
22
23 </HEAD>
24
25 <BODY BGCOLOR="white" onload="windowTitle();">
26
27
28 <!-- ========= START OF TOP NAVBAR ======= -->
29 <A NAME="navbar_top"><!-- --></A>
30 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32 <TR>
33 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34 <A NAME="navbar_top_firstrow"><!-- --></A>
35 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36   <TR ALIGN="center" VALIGN="top">
37   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44   </TR>
45 </TABLE>
46 </TD>
47 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48 </EM>
49 </TD>
50 </TR>
51
52 <TR>
53 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54 &nbsp;<A HREF="../../lejos/util/ArrayRecycler.html" title="class in lejos.util"><B>PREV CLASS</B></A>&nbsp;
55 &nbsp;<A HREF="../../lejos/util/ButtonCounter.html" title="class in lejos.util"><B>NEXT CLASS</B></A></FONT></TD>
56 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57   <A HREF="../../index.html?lejos/util/Assertion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
58 &nbsp;<A HREF="Assertion.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
59 &nbsp;<SCRIPT type="text/javascript">
60   <!--
61   if(window==top) {
62     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
63   }
64   //-->
65 </SCRIPT>
66 <NOSCRIPT>
67   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
68 </NOSCRIPT>
69
70
71 </FONT></TD>
72 </TR>
73 <TR>
74 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
76 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
78 </TR>
79 </TABLE>
80 <A NAME="skip-navbar_top"></A>
81 <!-- ========= END OF TOP NAVBAR ========= -->
82
83 <HR>
84 <!-- ======== START OF CLASS DATA ======== -->
85 <H2>
86 <FONT SIZE="-1">
87 lejos.util</FONT>
88 <BR>
89 Class Assertion</H2>
90 <PRE>
91 <A HREF="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</A>
92   <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>lejos.util.Assertion</B>
93 </PRE>
94 <HR>
95 <DL>
96 <DT><PRE>public class <B>Assertion</B><DT>extends <A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></DL>
97 </PRE>
98
99 <P>
100 Class used in debugging to test assertions. Implementation
101  is platform dependent. For example the unix_impl version
102  will print the string and throw an error if an assertion fails.
103  The rcx_impl version will only throw an error.
104 <P>
105
106 <P>
107 <DL>
108 <DT><B>Author:</B></DT>
109   <DD>Paul Andrews</DD>
110 </DL>
111 <HR>
112
113 <P>
114
115 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
116
117 <A NAME="constructor_summary"><!-- --></A>
118 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
119 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
120 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
121 <B>Constructor Summary</B></FONT></TH>
122 </TR>
123 <TR BGCOLOR="white" CLASS="TableRowColor">
124 <TD><CODE><B><A HREF="../../lejos/util/Assertion.html#Assertion()">Assertion</A></B>()</CODE>
125
126 <BR>
127 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
128 </TR>
129 </TABLE>
130 &nbsp;
131 <!-- ========== METHOD SUMMARY =========== -->
132
133 <A NAME="method_summary"><!-- --></A>
134 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
135 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
136 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
137 <B>Method Summary</B></FONT></TH>
138 </TR>
139 <TR BGCOLOR="white" CLASS="TableRowColor">
140 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
141 <CODE>static&nbsp;void</CODE></FONT></TD>
142 <TD><CODE><B><A HREF="../../lejos/util/Assertion.html#test(java.lang.String, boolean)">test</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
143      boolean&nbsp;flag)</CODE>
144
145 <BR>
146 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
147 </TR>
148 <TR BGCOLOR="white" CLASS="TableRowColor">
149 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150 <CODE>static&nbsp;void</CODE></FONT></TD>
151 <TD><CODE><B><A HREF="../../lejos/util/Assertion.html#testEQ(java.lang.String, int, int)">testEQ</A></B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
152        int&nbsp;expected,
153        int&nbsp;was)</CODE>
154
155 <BR>
156 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the actual value is not equal to the expected value, throw an Error.</TD>
157 </TR>
158 </TABLE>
159 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
160 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
161 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
162 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html" title="class in java.lang">Object</A></B></TH>
163 </TR>
164 <TR BGCOLOR="white" CLASS="TableRowColor">
165 <TD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A></CODE></TD>
166 </TR>
167 </TABLE>
168 &nbsp;
169 <P>
170
171 <!-- ========= CONSTRUCTOR DETAIL ======== -->
172
173 <A NAME="constructor_detail"><!-- --></A>
174 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
175 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
176 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
177 <B>Constructor Detail</B></FONT></TH>
178 </TR>
179 </TABLE>
180
181 <A NAME="Assertion()"><!-- --></A><H3>
182 Assertion</H3>
183 <PRE>
184 public <B>Assertion</B>()</PRE>
185 <DL>
186 </DL>
187
188 <!-- ============ METHOD DETAIL ========== -->
189
190 <A NAME="method_detail"><!-- --></A>
191 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
192 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
193 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
194 <B>Method Detail</B></FONT></TH>
195 </TR>
196 </TABLE>
197
198 <A NAME="test(java.lang.String, boolean)"><!-- --></A><H3>
199 test</H3>
200 <PRE>
201 public static void <B>test</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
202                         boolean&nbsp;flag)</PRE>
203 <DL>
204 <DD><DL>
205 <DT><B>Parameters:</B><DD><CODE>s</CODE> - A string that may be printed along with any other
206           error text.<DD><CODE>flag</CODE> - if true then an Error will be thrown, otherwise
207              nothing will happend.
208 <DT><B>Throws:</B>
209 <DD><CODE><A HREF="../../java/lang/Error.html" title="class in java.lang">Error</A></CODE> - if 'flag' is false.</DL>
210 </DD>
211 </DL>
212 <HR>
213
214 <A NAME="testEQ(java.lang.String, int, int)"><!-- --></A><H3>
215 testEQ</H3>
216 <PRE>
217 public static void <B>testEQ</B>(<A HREF="../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;s,
218                           int&nbsp;expected,
219                           int&nbsp;was)</PRE>
220 <DL>
221 <DD>If the actual value is not equal to the expected value, throw an Error.
222 <P>
223 <DD><DL>
224 <DT><B>Parameters:</B><DD><CODE>s</CODE> - A string that may be printed along with any other
225           error text.<DD><CODE>expected</CODE> - the expected value.<DD><CODE>was</CODE> - the actual value.
226 <DT><B>Throws:</B>
227 <DD><CODE><A HREF="../../java/lang/Error.html" title="class in java.lang">Error</A></CODE> - if 'flag' is false.</DL>
228 </DD>
229 </DL>
230 <!-- ========= END OF CLASS DATA ========= -->
231 <HR>
232
233
234 <!-- ======= START OF BOTTOM NAVBAR ====== -->
235 <A NAME="navbar_bottom"><!-- --></A>
236 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
237 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
238 <TR>
239 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
240 <A NAME="navbar_bottom_firstrow"><!-- --></A>
241 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
242   <TR ALIGN="center" VALIGN="top">
243   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
244   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
245   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
246   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
247   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
248   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
249   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
250   </TR>
251 </TABLE>
252 </TD>
253 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
254 </EM>
255 </TD>
256 </TR>
257
258 <TR>
259 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
260 &nbsp;<A HREF="../../lejos/util/ArrayRecycler.html" title="class in lejos.util"><B>PREV CLASS</B></A>&nbsp;
261 &nbsp;<A HREF="../../lejos/util/ButtonCounter.html" title="class in lejos.util"><B>NEXT CLASS</B></A></FONT></TD>
262 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
263   <A HREF="../../index.html?lejos/util/Assertion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
264 &nbsp;<A HREF="Assertion.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
265 &nbsp;<SCRIPT type="text/javascript">
266   <!--
267   if(window==top) {
268     document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
269   }
270   //-->
271 </SCRIPT>
272 <NOSCRIPT>
273   <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
274 </NOSCRIPT>
275
276
277 </FONT></TD>
278 </TR>
279 <TR>
280 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
281   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
282 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
283 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
284 </TR>
285 </TABLE>
286 <A NAME="skip-navbar_bottom"></A>
287 <!-- ======== END OF BOTTOM NAVBAR ======= -->
288
289 <HR>
290
291 </BODY>
292 </HTML>