Revision 39024
tags/v2_0_0_Build_2056/libraries/libIverUtiles/docs/list manager/tutorial.txt | ||
---|---|---|
1 |
1. Uso del control ListManagerDemoSkin |
|
2 |
|
|
3 |
Para incluir el control y definir su funcionalidad en |
|
4 |
un di?logo hay que a?adir el control como con cualquier |
|
5 |
otro a un JPanel. Una vez a?adido hay que definir el |
|
6 |
comportamiento de los botones, que se hace estableciendo |
|
7 |
el listener de eventos del ListManager: |
|
8 |
|
|
9 |
listManagerSkin.getListManager().setListener(); |
|
10 |
|
|
11 |
lo cual obligar? a implementar una interfaz, en la que se |
|
12 |
define el comportamiento de los botones a?adir y propiedades. |
|
13 |
|
|
14 |
Esto ya da la funcionalidad de los botones. Una vez esto hecho |
|
15 |
ser? bastante frecuente querer acceder a los objetos a?adidos, |
|
16 |
para ello se puede usar la siguiente instrucci?n: |
|
17 |
|
|
18 |
listManagerSkin.getListManager().getListModel().getObjects(); |
|
19 |
|
|
20 |
2. Creaci?n de un skin del control |
|
21 |
|
|
22 |
Para crear una skin (forma de visualizaci?n del control) hay |
|
23 |
que crear un control con los botones A?adir, eliminar, |
|
24 |
arriba, abajo y propiedades o un subconjunto de estos. Declarar |
|
25 |
un campo como |
|
26 |
|
|
27 |
private ListManager listManager = new ListManager(); |
|
28 |
|
|
29 |
Y en un m?todo de inicializaci?n del componente poner |
|
30 |
las siguientes instrucciones |
|
31 |
|
|
32 |
listManager.setBtnDown(getJButton()); |
|
33 |
listManager.setBtnUp(getJButton1()); |
|
34 |
listManager.setBtnAdd(getJButton2()); |
|
35 |
listManager.setBtnDel(getJButton3()); |
|
36 |
listManager.setList(getJList()); |
|
37 |
listManager.initialize(); |
|
0 | 38 |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/testdata/persistence-test.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xml-tag xmlns="http://www.gvsig.gva.es"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentList"/><xml-tag name="_item_data_"><xml-tag name="myList"><property key="_classname_" value="org.gvsig.tools.persistence.xmlentity.XMLEntityState$PersistentIterator"/><xml-tag name="_item_data_"><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.String"/><property key="_value_" value="This is my first$$ String to check"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.String"/><property key="_value_" value="An very long long long asdasfsafffffffffasfasasdffffffsflong long long long long asdfaaaddddddddddddddddddddddddasdsdfbkdfjger gsdf glkwerqwsdvsiñomodsgt string with specialcharacters and etc etc asdfasdfwqfwefwfasdfasfasfasfasfasfasfasasfasfasfasfasfasfasfasfdasdsdfsafsafasfasfsafasfasfasfasfasfassafasfasfasdfkb sdfd ertge ertwgfwrt43 fbgdsf gw wfwf sdgas asfwr324rf635r sdgsa swe3er 6546 sfasdfsafas asfaasdfasfasf435hdhge sfsd g dfsafasfsa as"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="9323823"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="-234234234"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="0"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Boolean"/><property key="_value_" value="true"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Boolean"/><property key="_value_" value="false"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentObject"/><xml-tag name="_item_data_"><property key="miValor" value="Sopa de cabrita"/><property key="numero" value="20090625"/></xml-tag></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentContainer"/><xml-tag name="_item_data_"><property key="miObjetito2" value="piripi pi"/><property key="miObjetito3" value="lepe lepero"/><xml-tag name="miObjetito1"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentObject"/><xml-tag name="_item_data_"><property key="miValor" value="Sopa de cabrita"/><property key="numero" value="20090625"/></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag> |
|
0 | 3 |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/testdata/persistence-test2.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xml-tag xmlns="http://www.gvsig.gva.es"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentContainer"/><xml-tag name="_item_data_"><property key="miObjetito1" value="pero perico pero"/><xml-tag name="miObjetito2"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentList"/><xml-tag name="_item_data_"><xml-tag name="myList"><property key="_classname_" value="org.gvsig.tools.persistence.xmlentity.XMLEntityState$PersistentIterator"/><xml-tag name="_item_data_"><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.String"/><property key="_value_" value="This is my first$$ String to check"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.String"/><property key="_value_" value="An very long long long asdasfsafffffffffasfasasdffffffsflong long long long long asdfaaaddddddddddddddddddddddddasdsdfbkdfjger gsdf glkwerqwsdvsiñomodsgt string with specialcharacters and etc etc asdfasdfwqfwefwfasdfasfasfasfasfasfasfasasfasfasfasfasfasfasfasfdasdsdfsafsafasfasfsafasfasfasfasfasfassafasfasfasdfkb sdfd ertge ertwgfwrt43 fbgdsf gw wfwf sdgas asfwr324rf635r sdgsa swe3er 6546 sfasdfsafas asfaasdfasfasf435hdhge sfsd g dfsafasfsa as"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="9323823"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="-234234234"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Integer"/><property key="_value_" value="0"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Boolean"/><property key="_value_" value="true"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="java.lang.Boolean"/><property key="_value_" value="false"/></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentObject"/><xml-tag name="_item_data_"><property key="miValor" value="Sopa de cabrita"/><property key="numero" value="20090625"/></xml-tag></xml-tag><xml-tag name="_iterator_item_"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentContainer"/><xml-tag name="_item_data_"><property key="miObjetito2" value="piripi pi"/><property key="miObjetito3" value="lepe lepero"/><xml-tag name="miObjetito1"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentObject"/><xml-tag name="_item_data_"><property key="miValor" value="Sopa de cabrita"/><property key="numero" value="20090625"/></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag></xml-tag><xml-tag name="miObjetito3"><property key="_classname_" value="com.iver.utiles.TestXMLEntityPersistenceManager$MyPersistentObject"/><xml-tag name="_item_data_"><property key="miValor" value="Sopa de cabrita"/><property key="numero" value="20090625"/></xml-tag></xml-tag></xml-tag></xml-tag> |
|
0 | 3 |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
5 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<artifactId>org.gvsig.utils</artifactId> |
|
8 |
<packaging>jar</packaging> |
|
9 |
<version>2.0-SNAPSHOT</version> |
|
10 |
<name>libIverUtiles</name> |
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>gvsig-base-library-pom</artifactId> |
|
14 |
<version>2.0-SNAPSHOT</version> |
|
15 |
</parent> |
|
16 |
<dependencies> |
|
17 |
<dependency> |
|
18 |
<groupId>org.gvsig</groupId> |
|
19 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
20 |
<scope>compile</scope> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
25 |
<scope>compile</scope> |
|
26 |
</dependency> |
|
27 |
<dependency> |
|
28 |
<groupId>org.gvsig</groupId> |
|
29 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
30 |
<type>test-jar</type> |
|
31 |
<scope>test</scope> |
|
32 |
</dependency> |
|
33 |
<dependency> |
|
34 |
<groupId>castor</groupId> |
|
35 |
<artifactId>castor</artifactId> |
|
36 |
<scope>compile</scope> |
|
37 |
</dependency> |
|
38 |
</dependencies> |
|
39 |
<properties> |
|
40 |
<build-dir>${basedir}/../build</build-dir> |
|
41 |
<eclipse.project.name>libIverUtiles</eclipse.project.name> |
|
42 |
</properties> |
|
43 |
<build> |
|
44 |
<sourceDirectory>src</sourceDirectory> |
|
45 |
<testSourceDirectory>src-test</testSourceDirectory> |
|
46 |
<resources> |
|
47 |
<resource> |
|
48 |
<directory>src</directory> |
|
49 |
<includes> |
|
50 |
<include>**/*.gif</include> |
|
51 |
<include>**/*.png</include> |
|
52 |
<include>**/*.PNG</include> |
|
53 |
<include> **/*.bmp</include> |
|
54 |
<include> **/*.jpg</include> |
|
55 |
<include> **/*.jpeg</include> |
|
56 |
<include> **/*.properties</include> |
|
57 |
</includes> |
|
58 |
</resource> |
|
59 |
<resource> |
|
60 |
<directory>${basedir}/resources</directory> |
|
61 |
</resource> |
|
62 |
</resources> |
|
63 |
<testResources> |
|
64 |
<testResource> |
|
65 |
<directory>${basedir}/resources-test</directory> |
|
66 |
</testResource> |
|
67 |
</testResources> |
|
68 |
|
|
69 |
<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION --> |
|
70 |
<plugins> |
|
71 |
<plugin> |
|
72 |
<groupId>org.apache.maven.plugins</groupId> |
|
73 |
<artifactId>maven-surefire-plugin</artifactId> |
|
74 |
<configuration> |
|
75 |
<skipTests>true</skipTests> |
|
76 |
</configuration> |
|
77 |
</plugin> |
|
78 |
</plugins> |
|
79 |
|
|
80 |
</build> |
|
81 |
|
|
82 |
<reporting> |
|
83 |
<plugins> |
|
84 |
<plugin> |
|
85 |
<groupId>org.apache.maven.plugins</groupId> |
|
86 |
<artifactId>maven-javadoc-plugin</artifactId> |
|
87 |
<configuration> |
|
88 |
<name>Javadoc: API</name> |
|
89 |
<destDir>apidoc</destDir> |
|
90 |
<windowtitle>API Documentation</windowtitle> |
|
91 |
</configuration> |
|
92 |
</plugin> |
|
93 |
</plugins> |
|
94 |
</reporting> |
|
95 |
</project> |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.tools.IverUtilesLibrary |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/xmlEntity.xml | ||
---|---|---|
1 |
<project name="MyProject" default="generate-config-classes" basedir="."> |
|
2 |
<!-- set global properties for this build --> |
|
3 |
<property name="bin" location="bin" /> |
|
4 |
<property name="src" location="src" /> |
|
5 |
<property name="lib" location="lib" /> |
|
6 |
<property name="schemas" location="schemas" /> |
|
7 |
|
|
8 |
<target name="init"> |
|
9 |
<!-- Create the time stamp --> |
|
10 |
<tstamp /> |
|
11 |
</target> |
|
12 |
|
|
13 |
<!-- Genera las clases a partir de los esquemas --> |
|
14 |
<target name="generate-config-classes"> |
|
15 |
<delete> |
|
16 |
<fileset dir="${src}" includes="com/iver/utiles/xmlEntity/generate/**" /> |
|
17 |
</delete> |
|
18 |
<java classname="org.exolab.castor.builder.SourceGenerator"> |
|
19 |
<classpath> |
|
20 |
<pathelement path="../GVSIG/lib/castor-0.9.5.3-xml.jar" /> |
|
21 |
<pathelement path="../GVSIG/lib/xercesImpl.jar" /> |
|
22 |
</classpath> |
|
23 |
<arg value="-i" /> |
|
24 |
<arg value="${schemas}/xml-entity.xsd" /> |
|
25 |
<arg value="-package" /> |
|
26 |
<arg value="com.iver.utiles.xmlEntity.generate" /> |
|
27 |
<arg value="-dest" /> |
|
28 |
<arg value="${src}" /> |
|
29 |
</java> |
|
30 |
</target> |
|
31 |
|
|
32 |
</project> |
|
0 | 33 |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/.cvsignore | ||
---|---|---|
1 |
bin |
|
2 |
bin-test |
|
0 | 3 |
tags/v2_0_0_Build_2056/libraries/libIverUtiles/src-test/org/gvsig/utils/stringNumberUtilities/TestStringNumberUtilities.java | ||
---|---|---|
1 |
package org.gvsig.utils.stringNumberUtilities; |
|
2 |
|
|
3 |
import org.gvsig.utils.stringNumberUtilities.StringNumberUtilities; |
|
4 |
|
|
5 |
import junit.framework.TestCase; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
|
|
48 |
/** |
|
49 |
* Tests the methods of the class StringNumberUtilities |
|
50 |
* |
|
51 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
|
52 |
*/ |
|
53 |
public class TestStringNumberUtilities extends TestCase{ |
|
54 |
private String word; |
|
55 |
|
|
56 |
/* |
|
57 |
* (non-Javadoc) |
|
58 |
* @see junit.framework.TestCase#setUp() |
|
59 |
*/ |
|
60 |
protected void setUp() throws Exception { |
|
61 |
super.setUp(); |
|
62 |
word = new String(); |
|
63 |
} |
|
64 |
|
|
65 |
/* |
|
66 |
* (non-Javadoc) |
|
67 |
* @see junit.framework.TestCase#tearDown() |
|
68 |
*/ |
|
69 |
protected void tearDown() throws Exception { |
|
70 |
super.tearDown(); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* A test |
|
75 |
*/ |
|
76 |
public void test1() { |
|
77 |
word = "2.3"; |
|
78 |
ShowText.showIsNumberText(word); |
|
79 |
|
|
80 |
if (StringNumberUtilities.isNumber(word)) { |
|
81 |
ShowText.showYes(); |
|
82 |
} |
|
83 |
else { |
|
84 |
ShowText.showNo(); |
|
85 |
fail(); |
|
86 |
} |
|
87 |
} |
|
88 |
|
|
89 |
/** |
|
90 |
* A test |
|
91 |
*/ |
|
92 |
public void test2() { |
|
93 |
word = "a as wz rwa"; |
|
94 |
ShowText.showIsNumberText(word); |
|
95 |
|
|
96 |
if (StringNumberUtilities.isNumber(word)) { |
|
97 |
ShowText.showYes(); |
|
98 |
} |
|
99 |
else { |
|
100 |
ShowText.showNo(); |
|
101 |
fail(); |
|
102 |
} |
|
103 |
} |
|
104 |
|
|
105 |
/** |
|
106 |
* A test |
|
107 |
*/ |
|
108 |
public void test3() { |
|
109 |
word = "2"; |
|
110 |
ShowText.showIsNumberText(word); |
|
111 |
|
|
112 |
if (StringNumberUtilities.isNumber(word)) { |
|
113 |
ShowText.showYes(); |
|
114 |
} |
|
115 |
else { |
|
116 |
ShowText.showNo(); |
|
117 |
fail(); |
|
118 |
} |
|
119 |
} |
|
120 |
|
|
121 |
/** |
|
122 |
* A test |
|
123 |
*/ |
|
124 |
public void test4() { |
|
125 |
word = ""; |
|
126 |
ShowText.showIsNumberText(word); |
|
127 |
|
|
128 |
if (StringNumberUtilities.isNumber(word)) { |
|
129 |
ShowText.showYes(); |
|
130 |
} |
|
131 |
else { |
|
132 |
ShowText.showNo(); |
|
133 |
fail(); |
|
134 |
} |
|
135 |
} |
|
136 |
|
|
137 |
/** |
|
138 |
* A test |
|
139 |
*/ |
|
140 |
public void test5() { |
|
141 |
word = "-2.3"; |
|
142 |
ShowText.showIsNumberText(word); |
|
143 |
|
|
144 |
if (StringNumberUtilities.isNumber(word)) { |
|
145 |
ShowText.showYes(); |
|
146 |
} |
|
147 |
else { |
|
148 |
ShowText.showNo(); |
|
149 |
fail(); |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
153 |
/** |
|
154 |
* A test |
|
155 |
*/ |
|
156 |
public void test6() { |
|
157 |
word = "-300"; |
|
158 |
ShowText.showIsNumberText(word); |
|
159 |
|
|
160 |
if (StringNumberUtilities.isNumber(word)) { |
|
161 |
ShowText.showYes(); |
|
162 |
} |
|
163 |
else { |
|
164 |
ShowText.showNo(); |
|
165 |
fail(); |
|
166 |
} |
|
167 |
} |
|
168 |
|
|
169 |
/** |
|
170 |
* A test |
|
171 |
*/ |
|
172 |
public void test7() { |
|
173 |
word = "2.3"; |
|
174 |
ShowText.showIsNaturalText(word); |
|
175 |
|
|
176 |
if (StringNumberUtilities.isNaturalNumber(word)) { |
|
177 |
ShowText.showYes(); |
|
178 |
} |
|
179 |
else { |
|
180 |
ShowText.showNo(); |
|
181 |
fail(); |
|
182 |
} |
|
183 |
} |
|
184 |
|
|
185 |
/** |
|
186 |
* A test |
|
187 |
*/ |
|
188 |
public void test8() { |
|
189 |
word = "334"; |
|
190 |
ShowText.showIsNaturalText(word); |
|
191 |
|
|
192 |
if (StringNumberUtilities.isNaturalNumber(word)) { |
|
193 |
ShowText.showYes(); |
|
194 |
} |
|
195 |
else { |
|
196 |
ShowText.showNo(); |
|
197 |
fail(); |
|
198 |
} |
|
199 |
} |
|
200 |
|
|
201 |
/** |
|
202 |
* A test |
|
203 |
*/ |
|
204 |
public void test9() { |
|
205 |
word = "-2a3"; |
|
206 |
ShowText.showIsIntegerText(word); |
|
207 |
|
|
208 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
209 |
ShowText.showYes(); |
|
210 |
} |
|
211 |
else { |
|
212 |
ShowText.showNo(); |
|
213 |
fail(); |
|
214 |
} |
|
215 |
} |
|
216 |
|
|
217 |
/** |
|
218 |
* A test |
|
219 |
*/ |
|
220 |
public void test10() { |
|
221 |
word = "-23"; |
|
222 |
ShowText.showIsIntegerText(word); |
|
223 |
|
|
224 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
225 |
ShowText.showYes(); |
|
226 |
} |
|
227 |
else { |
|
228 |
ShowText.showNo(); |
|
229 |
fail(); |
|
230 |
} |
|
231 |
} |
|
232 |
|
|
233 |
/** |
|
234 |
* A test |
|
235 |
*/ |
|
236 |
public void test11() { |
|
237 |
word = "7"; |
|
238 |
ShowText.showIsIntegerText(word); |
|
239 |
|
|
240 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
241 |
ShowText.showYes(); |
|
242 |
} |
|
243 |
else { |
|
244 |
ShowText.showNo(); |
|
245 |
fail(); |
|
246 |
} |
|
247 |
} |
|
248 |
|
|
249 |
/** |
|
250 |
* A test |
|
251 |
*/ |
|
252 |
public void test12() { |
|
253 |
word = "2.3"; |
|
254 |
ShowText.showIsIntegerText(word); |
|
255 |
|
|
256 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
257 |
ShowText.showYes(); |
|
258 |
} |
|
259 |
else { |
|
260 |
ShowText.showNo(); |
|
261 |
fail(); |
|
262 |
} |
|
263 |
} |
|
264 |
|
|
265 |
/** |
|
266 |
* A test |
|
267 |
*/ |
|
268 |
public void test13() { |
|
269 |
word = "2.3"; |
|
270 |
ShowText.showIsRealText(word); |
|
271 |
|
|
272 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
273 |
ShowText.showYes(); |
|
274 |
} |
|
275 |
else { |
|
276 |
ShowText.showNo(); |
|
277 |
fail(); |
|
278 |
} |
|
279 |
} |
|
280 |
|
|
281 |
/** |
|
282 |
* A test |
|
283 |
*/ |
|
284 |
public void test14() { |
|
285 |
word = "37"; |
|
286 |
ShowText.showIsRealText(word); |
|
287 |
|
|
288 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
289 |
ShowText.showYes(); |
|
290 |
} |
|
291 |
else { |
|
292 |
ShowText.showNo(); |
|
293 |
fail(); |
|
294 |
} |
|
295 |
} |
|
296 |
|
|
297 |
/** |
|
298 |
* A test |
|
299 |
*/ |
|
300 |
public void test15() { |
|
301 |
word = "-4.6"; |
|
302 |
ShowText.showIsRealText(word); |
|
303 |
|
|
304 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
305 |
ShowText.showYes(); |
|
306 |
} |
|
307 |
else { |
|
308 |
ShowText.showNo(); |
|
309 |
fail(); |
|
310 |
} |
|
311 |
} |
|
312 |
|
|
313 |
/** |
|
314 |
* A test |
|
315 |
*/ |
|
316 |
public void test16() { |
|
317 |
word = "-8000"; |
|
318 |
ShowText.showIsRealText(word); |
|
319 |
|
|
320 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
321 |
ShowText.showYes(); |
|
322 |
} |
|
323 |
else { |
|
324 |
ShowText.showNo(); |
|
325 |
fail(); |
|
326 |
} |
|
327 |
} |
|
328 |
|
|
329 |
/** |
|
330 |
* A test |
|
331 |
*/ |
|
332 |
public void test17() { |
|
333 |
word = "-80k00"; |
|
334 |
ShowText.showIsRealText(word); |
|
335 |
|
|
336 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
337 |
ShowText.showYes(); |
|
338 |
} |
|
339 |
else { |
|
340 |
ShowText.showNo(); |
|
341 |
fail(); |
|
342 |
} |
|
343 |
} |
|
344 |
|
|
345 |
/** |
|
346 |
* A test |
|
347 |
*/ |
|
348 |
public void test18() { |
|
349 |
word = ".6"; |
|
350 |
ShowText.showIsRealText(word); |
|
351 |
|
|
352 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
353 |
ShowText.showYes(); |
|
354 |
} |
|
355 |
else { |
|
356 |
ShowText.showNo(); |
|
357 |
fail(); |
|
358 |
} |
|
359 |
} |
|
360 |
|
|
361 |
/** |
|
362 |
* A test |
|
363 |
*/ |
|
364 |
public void test19() { |
|
365 |
word = "-.6"; |
|
366 |
ShowText.showIsRealText(word); |
|
367 |
|
|
368 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
369 |
ShowText.showYes(); |
|
370 |
} |
|
371 |
else { |
|
372 |
ShowText.showNo(); |
|
373 |
fail(); |
|
374 |
} |
|
375 |
} |
|
376 |
|
|
377 |
/** |
|
378 |
* A test |
|
379 |
*/ |
|
380 |
public void test20() { |
|
381 |
word = "b-.6"; |
|
382 |
ShowText.showIsRealText(word); |
|
383 |
|
|
384 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
385 |
ShowText.showYes(); |
|
386 |
} |
|
387 |
else { |
|
388 |
ShowText.showNo(); |
|
389 |
fail(); |
|
390 |
} |
|
391 |
} |
|
392 |
|
|
393 |
|
|
394 |
/** |
|
395 |
* A test |
|
396 |
*/ |
|
397 |
public void test21() { |
|
398 |
word = "-c.6"; |
|
399 |
ShowText.showIsRealText(word); |
|
400 |
|
|
401 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
402 |
ShowText.showYes(); |
|
403 |
} |
|
404 |
else { |
|
405 |
ShowText.showNo(); |
|
406 |
fail(); |
|
407 |
} |
|
408 |
} |
|
409 |
|
|
410 |
|
|
411 |
/** |
|
412 |
* A test |
|
413 |
*/ |
|
414 |
public void test22() { |
|
415 |
word = "-.d6"; |
|
416 |
ShowText.showIsRealText(word); |
|
417 |
|
|
418 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
419 |
ShowText.showYes(); |
|
420 |
} |
|
421 |
else { |
|
422 |
ShowText.showNo(); |
|
423 |
fail(); |
|
424 |
} |
|
425 |
} |
|
426 |
|
|
427 |
/** |
|
428 |
* A test |
|
429 |
*/ |
|
430 |
public void test23() { |
|
431 |
word = "-.6e"; |
|
432 |
ShowText.showIsRealText(word); |
|
433 |
|
|
434 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
435 |
ShowText.showYes(); |
|
436 |
} |
|
437 |
else { |
|
438 |
ShowText.showNo(); |
|
439 |
fail(); |
|
440 |
} |
|
441 |
} |
|
442 |
|
|
443 |
/** |
|
444 |
* A test |
|
445 |
*/ |
|
446 |
public void test24() { |
|
447 |
word = "+.6"; |
|
448 |
ShowText.showIsRealText(word); |
|
449 |
|
|
450 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
451 |
ShowText.showYes(); |
|
452 |
} |
|
453 |
else { |
|
454 |
ShowText.showNo(); |
|
455 |
fail(); |
|
456 |
} |
|
457 |
} |
|
458 |
|
|
459 |
/** |
|
460 |
* A test |
|
461 |
*/ |
|
462 |
public void test25() { |
|
463 |
word = "+.6"; |
|
464 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
465 |
|
|
466 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
467 |
ShowText.showYes(); |
|
468 |
} |
|
469 |
else { |
|
470 |
ShowText.showNo(); |
|
471 |
fail(); |
|
472 |
} |
|
473 |
} |
|
474 |
|
|
475 |
|
|
476 |
/** |
|
477 |
* A test |
|
478 |
*/ |
|
479 |
public void test26() { |
|
480 |
word = ".6"; |
|
481 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
482 |
|
|
483 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
484 |
ShowText.showYes(); |
|
485 |
} |
|
486 |
else { |
|
487 |
ShowText.showNo(); |
|
488 |
fail(); |
|
489 |
} |
|
490 |
} |
|
491 |
|
|
492 |
|
|
493 |
/** |
|
494 |
* A test |
|
495 |
*/ |
|
496 |
public void test27() { |
|
497 |
word = "-.6"; |
|
498 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
499 |
|
|
500 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
501 |
ShowText.showYes(); |
|
502 |
} |
|
503 |
else { |
|
504 |
ShowText.showNo(); |
|
505 |
fail(); |
|
506 |
} |
|
507 |
} |
|
508 |
|
|
509 |
|
|
510 |
/** |
|
511 |
* A test |
|
512 |
*/ |
|
513 |
public void test28() { |
|
514 |
word = "+6"; |
|
515 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
516 |
|
|
517 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
518 |
ShowText.showYes(); |
|
519 |
} |
|
520 |
else { |
|
521 |
ShowText.showNo(); |
|
522 |
fail(); |
|
523 |
} |
|
524 |
} |
|
525 |
|
|
526 |
|
|
527 |
/** |
|
528 |
* A test |
|
529 |
*/ |
|
530 |
public void test29() { |
|
531 |
word = "-6"; |
|
532 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
533 |
|
|
534 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
535 |
ShowText.showYes(); |
|
536 |
} |
|
537 |
else { |
|
538 |
ShowText.showNo(); |
|
539 |
fail(); |
|
540 |
} |
|
541 |
} |
|
542 |
|
|
543 |
|
|
544 |
/** |
|
545 |
* A test |
|
546 |
*/ |
|
547 |
public void test30() { |
|
548 |
word = "6"; |
|
549 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
550 |
|
|
551 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
552 |
ShowText.showYes(); |
|
553 |
} |
|
554 |
else { |
|
555 |
ShowText.showNo(); |
|
556 |
fail(); |
|
557 |
} |
|
558 |
} |
|
559 |
|
|
560 |
/** |
|
561 |
* A test |
|
562 |
*/ |
|
563 |
public void test31() { |
|
564 |
word = "136.13"; |
|
565 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
566 |
|
|
567 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
568 |
ShowText.showYes(); |
|
569 |
} |
|
570 |
else { |
|
571 |
ShowText.showNo(); |
|
572 |
fail(); |
|
573 |
} |
|
574 |
} |
|
575 |
|
|
576 |
|
|
577 |
/** |
|
578 |
* A test |
|
579 |
*/ |
|
580 |
public void test32() { |
|
581 |
word = "+13.42"; |
|
582 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
583 |
|
|
584 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
585 |
ShowText.showYes(); |
|
586 |
} |
|
587 |
else { |
|
588 |
ShowText.showNo(); |
|
589 |
fail(); |
|
590 |
} |
|
591 |
} |
|
592 |
|
|
593 |
/** |
|
594 |
* A test |
|
595 |
*/ |
|
596 |
public void test33() { |
|
597 |
word = "-246.24"; |
|
598 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
599 |
|
|
600 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
601 |
ShowText.showYes(); |
|
602 |
} |
|
603 |
else { |
|
604 |
ShowText.showNo(); |
|
605 |
fail(); |
|
606 |
} |
|
607 |
} |
|
608 |
|
|
609 |
/** |
|
610 |
* A test |
|
611 |
*/ |
|
612 |
public void test34() { |
|
613 |
word = "146.134E+13"; |
|
614 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
615 |
|
|
616 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
617 |
ShowText.showYes(); |
|
618 |
} |
|
619 |
else { |
|
620 |
ShowText.showNo(); |
|
621 |
fail(); |
|
622 |
} |
|
623 |
} |
|
624 |
|
|
625 |
/** |
|
626 |
* A test |
|
627 |
*/ |
|
628 |
public void test35() { |
|
629 |
word = "614.425E-67"; |
|
630 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
631 |
|
|
632 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
633 |
ShowText.showYes(); |
|
634 |
} |
|
635 |
else { |
|
636 |
ShowText.showNo(); |
|
637 |
fail(); |
|
638 |
} |
|
639 |
} |
|
640 |
|
|
641 |
/** |
|
642 |
* A test |
|
643 |
*/ |
|
644 |
public void test36() { |
|
645 |
word = "-8945.1201e48.141"; |
|
646 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
647 |
|
|
648 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
649 |
ShowText.showYes(); |
|
650 |
} |
|
651 |
else { |
|
652 |
ShowText.showNo(); |
|
653 |
fail(); |
|
654 |
} |
|
655 |
} |
|
656 |
|
|
657 |
/** |
|
658 |
* A test |
|
659 |
*/ |
|
660 |
public void test37() { |
|
661 |
word = "-8945.1201e48.141."; |
|
662 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
663 |
|
|
664 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
665 |
ShowText.showYes(); |
|
666 |
} |
|
667 |
else { |
|
668 |
ShowText.showNo(); |
|
669 |
fail(); |
|
670 |
} |
|
671 |
} |
|
672 |
|
|
673 |
/** |
|
674 |
* A test |
|
675 |
*/ |
|
676 |
public void test38() { |
|
677 |
word = "8945.1201ee48.141"; |
|
678 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
679 |
|
|
680 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
681 |
ShowText.showYes(); |
|
682 |
} |
|
683 |
else { |
|
684 |
ShowText.showNo(); |
|
685 |
fail(); |
|
686 |
} |
|
687 |
} |
|
688 |
|
|
689 |
/** |
|
690 |
* A test |
|
691 |
*/ |
|
692 |
public void test39() { |
|
693 |
word = "8945.1201E"; |
|
694 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
695 |
|
|
696 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
697 |
ShowText.showYes(); |
|
698 |
} |
|
699 |
else { |
|
700 |
ShowText.showNo(); |
|
701 |
fail(); |
|
702 |
} |
|
703 |
} |
|
704 |
|
|
705 |
/** |
|
706 |
* A test |
|
707 |
*/ |
|
708 |
public void test40() { |
|
709 |
word = "8945.1201e+"; |
|
710 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
711 |
|
|
712 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
713 |
ShowText.showYes(); |
|
714 |
} |
|
715 |
else { |
|
716 |
ShowText.showNo(); |
|
717 |
fail(); |
|
718 |
} |
|
719 |
} |
|
720 |
|
|
721 |
/** |
|
722 |
* A test |
|
723 |
*/ |
|
724 |
public void test41() { |
|
725 |
word = "8945.1201e+1"; |
|
726 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
727 |
|
|
728 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
729 |
ShowText.showYes(); |
|
730 |
} |
|
731 |
else { |
|
732 |
ShowText.showNo(); |
|
733 |
fail(); |
|
734 |
} |
|
735 |
} |
|
736 |
|
|
737 |
|
|
738 |
/** |
|
739 |
* A test |
|
740 |
*/ |
|
741 |
public void test42() { |
|
742 |
word = "8945.1201e+.32"; |
|
743 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
744 |
|
|
745 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
746 |
ShowText.showYes(); |
|
747 |
} |
|
748 |
else { |
|
749 |
ShowText.showNo(); |
|
750 |
fail(); |
|
751 |
} |
|
752 |
} |
|
753 |
|
|
754 |
/** |
|
755 |
* A test |
|
756 |
*/ |
|
757 |
public void test43() { |
|
758 |
word = "+.6"; |
|
759 |
ShowText.showIsRealWithRealExponentText(word); |
|
760 |
|
|
761 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
762 |
ShowText.showYes(); |
|
763 |
} |
|
764 |
else { |
|
765 |
ShowText.showNo(); |
|
766 |
fail(); |
|
767 |
} |
|
768 |
} |
|
769 |
|
|
770 |
|
|
771 |
/** |
|
772 |
* A test |
|
773 |
*/ |
|
774 |
public void test44() { |
|
775 |
word = ".6"; |
|
776 |
ShowText.showIsRealWithRealExponentText(word); |
|
777 |
|
|
778 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
779 |
ShowText.showYes(); |
|
780 |
} |
|
781 |
else { |
|
782 |
ShowText.showNo(); |
|
783 |
fail(); |
|
784 |
} |
|
785 |
} |
|
786 |
|
|
787 |
|
|
788 |
/** |
|
789 |
* A test |
|
790 |
*/ |
|
791 |
public void test45() { |
|
792 |
word = "-.6"; |
|
793 |
ShowText.showIsRealWithRealExponentText(word); |
|
794 |
|
|
795 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
796 |
ShowText.showYes(); |
|
797 |
} |
|
798 |
else { |
|
799 |
ShowText.showNo(); |
|
800 |
fail(); |
|
801 |
} |
|
802 |
} |
|
803 |
|
|
804 |
|
|
805 |
/** |
|
806 |
* A test |
|
807 |
*/ |
|
808 |
public void test46() { |
|
809 |
word = "+6"; |
|
810 |
ShowText.showIsRealWithRealExponentText(word); |
|
811 |
|
|
812 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
813 |
ShowText.showYes(); |
|
814 |
} |
|
815 |
else { |
|
816 |
ShowText.showNo(); |
|
817 |
fail(); |
|
818 |
} |
|
819 |
} |
|
820 |
|
|
821 |
|
|
822 |
/** |
|
823 |
* A test |
|
824 |
*/ |
|
825 |
public void test47() { |
|
826 |
word = "-6"; |
|
827 |
ShowText.showIsRealWithRealExponentText(word); |
|
828 |
|
|
829 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
830 |
ShowText.showYes(); |
|
831 |
} |
|
832 |
else { |
|
833 |
ShowText.showNo(); |
|
834 |
fail(); |
|
835 |
} |
|
836 |
} |
|
837 |
|
|
838 |
|
|
839 |
/** |
|
840 |
* A test |
|
841 |
*/ |
|
842 |
public void test48() { |
|
843 |
word = "6"; |
|
844 |
ShowText.showIsRealWithRealExponentText(word); |
|
845 |
|
|
846 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
847 |
ShowText.showYes(); |
|
848 |
} |
|
849 |
else { |
|
850 |
ShowText.showNo(); |
|
851 |
fail(); |
|
852 |
} |
|
853 |
} |
|
854 |
|
|
855 |
/** |
|
856 |
* A test |
|
857 |
*/ |
|
858 |
public void test49() { |
|
859 |
word = "136.13"; |
|
860 |
ShowText.showIsRealWithRealExponentText(word); |
|
861 |
|
|
862 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
863 |
ShowText.showYes(); |
|
864 |
} |
|
865 |
else { |
|
866 |
ShowText.showNo(); |
|
867 |
fail(); |
|
868 |
} |
|
869 |
} |
|
870 |
|
|
871 |
|
|
872 |
/** |
|
873 |
* A test |
|
874 |
*/ |
|
875 |
public void test50() { |
|
876 |
word = "+13.42"; |
|
877 |
ShowText.showIsRealWithRealExponentText(word); |
|
878 |
|
|
879 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
880 |
ShowText.showYes(); |
|
881 |
} |
|
882 |
else { |
|
883 |
ShowText.showNo(); |
|
884 |
fail(); |
|
885 |
} |
|
886 |
} |
|
887 |
|
|
888 |
/** |
|
889 |
* A test |
|
890 |
*/ |
|
891 |
public void test51() { |
|
892 |
word = "-246.24"; |
|
893 |
ShowText.showIsRealWithRealExponentText(word); |
|
894 |
|
|
895 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
896 |
ShowText.showYes(); |
|
897 |
} |
|
898 |
else { |
|
899 |
ShowText.showNo(); |
|
900 |
fail(); |
|
901 |
} |
|
902 |
} |
|
903 |
|
|
904 |
/** |
|
905 |
* A test |
|
906 |
*/ |
|
907 |
public void test52() { |
|
908 |
word = "146.134E+13"; |
|
909 |
ShowText.showIsRealWithRealExponentText(word); |
|
910 |
|
|
911 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
912 |
ShowText.showYes(); |
|
913 |
} |
|
914 |
else { |
|
915 |
ShowText.showNo(); |
|
916 |
fail(); |
|
917 |
} |
|
918 |
} |
|
919 |
|
|
920 |
/** |
|
921 |
* A test |
|
922 |
*/ |
|
923 |
public void test53() { |
|
924 |
word = "614.425E-67"; |
|
925 |
ShowText.showIsRealWithRealExponentText(word); |
|
926 |
|
|
927 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
928 |
ShowText.showYes(); |
|
929 |
} |
|
930 |
else { |
|
931 |
ShowText.showNo(); |
|
932 |
fail(); |
|
933 |
} |
|
934 |
} |
|
935 |
|
|
936 |
/** |
|
937 |
* A test |
|
938 |
*/ |
|
939 |
public void test54() { |
|
940 |
word = "-8945.1201e48.141"; |
|
941 |
ShowText.showIsRealWithRealExponentText(word); |
|
942 |
|
|
943 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
944 |
ShowText.showYes(); |
|
945 |
} |
|
946 |
else { |
|
947 |
ShowText.showNo(); |
|
948 |
fail(); |
|
949 |
} |
|
950 |
} |
|
951 |
|
|
952 |
/** |
|
953 |
* A test |
|
954 |
*/ |
|
955 |
public void test55() { |
|
956 |
word = "-8945.1201e48.141."; |
|
957 |
ShowText.showIsRealWithRealExponentText(word); |
|
958 |
|
|
959 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
960 |
ShowText.showYes(); |
|
961 |
} |
|
962 |
else { |
|
963 |
ShowText.showNo(); |
|
964 |
fail(); |
|
965 |
} |
|
966 |
} |
|
967 |
|
|
968 |
/** |
|
969 |
* A test |
|
970 |
*/ |
|
971 |
public void test56() { |
|
972 |
word = "8945.1201ee48.141"; |
|
973 |
ShowText.showIsRealWithRealExponentText(word); |
|
974 |
|
|
975 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
976 |
ShowText.showYes(); |
|
977 |
} |
|
978 |
else { |
|
979 |
ShowText.showNo(); |
|
980 |
fail(); |
|
981 |
} |
|
982 |
} |
|
983 |
|
|
984 |
/** |
|
985 |
* A test |
|
986 |
*/ |
|
987 |
public void test57() { |
|
988 |
word = "8945.1201E"; |
|
989 |
ShowText.showIsRealWithRealExponentText(word); |
|
990 |
|
|
991 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
992 |
ShowText.showYes(); |
|
993 |
} |
|
994 |
else { |
|
995 |
ShowText.showNo(); |
|
996 |
fail(); |
|
997 |
} |
|
998 |
} |
|
999 |
|
|
1000 |
/** |
|
1001 |
* A test |
|
1002 |
*/ |
|
1003 |
public void test58() { |
|
1004 |
word = "8945.1201e+"; |
|
1005 |
ShowText.showIsRealWithRealExponentText(word); |
|
1006 |
|
|
1007 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
1008 |
ShowText.showYes(); |
|
1009 |
} |
|
1010 |
else { |
|
1011 |
ShowText.showNo(); |
|
1012 |
fail(); |
|
1013 |
} |
|
1014 |
} |
|
1015 |
|
|
1016 |
/** |
|
1017 |
* A test |
|
1018 |
*/ |
|
1019 |
public void test59() { |
|
1020 |
word = "8945.1201e+1"; |
|
1021 |
ShowText.showIsRealWithRealExponentText(word); |
|
1022 |
|
|
1023 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
1024 |
ShowText.showYes(); |
|
1025 |
} |
|
1026 |
else { |
|
1027 |
ShowText.showNo(); |
|
1028 |
fail(); |
|
1029 |
} |
|
1030 |
} |
|
1031 |
|
|
1032 |
/** |
|
1033 |
* A test |
|
1034 |
*/ |
|
1035 |
public void test60() { |
|
1036 |
word = "8945.1201e+.32"; |
|
1037 |
ShowText.showIsRealWithRealExponentText(word); |
|
1038 |
|
|
1039 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
1040 |
ShowText.showYes(); |
|
1041 |
} |
|
1042 |
else { |
|
1043 |
ShowText.showNo(); |
|
1044 |
fail(); |
|
1045 |
} |
|
1046 |
} |
|
1047 |
|
|
1048 |
/** |
|
1049 |
* A test |
|
1050 |
*/ |
|
1051 |
public void test61() { |
|
1052 |
word = "-"; |
|
1053 |
ShowText.showIsIntegerText(word); |
|
1054 |
|
|
1055 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
1056 |
ShowText.showYes(); |
|
1057 |
} |
|
1058 |
else { |
|
1059 |
ShowText.showNo(); |
|
1060 |
fail(); |
|
1061 |
} |
|
1062 |
} |
|
1063 |
|
|
1064 |
/** |
|
1065 |
* A test |
|
1066 |
*/ |
|
1067 |
public void test62() { |
|
1068 |
word = "-"; |
|
1069 |
ShowText.showIsNaturalText(word); |
|
1070 |
|
|
1071 |
if (StringNumberUtilities.isNaturalNumber(word)) { |
|
1072 |
ShowText.showYes(); |
|
1073 |
} |
|
1074 |
else { |
|
1075 |
ShowText.showNo(); |
|
1076 |
fail(); |
|
1077 |
} |
|
1078 |
} |
|
1079 |
|
|
1080 |
/** |
|
1081 |
* A test |
|
1082 |
*/ |
|
1083 |
public void test63() { |
|
1084 |
word = "-"; |
|
1085 |
ShowText.showIsNumberText(word); |
|
1086 |
|
|
1087 |
if (StringNumberUtilities.isNumber(word)) { |
|
1088 |
ShowText.showYes(); |
|
1089 |
} |
|
1090 |
else { |
|
1091 |
ShowText.showNo(); |
|
1092 |
fail(); |
|
1093 |
} |
|
1094 |
} |
|
1095 |
|
|
1096 |
/** |
|
1097 |
* A test |
|
1098 |
*/ |
|
1099 |
public void test64() { |
|
1100 |
word = "-"; |
|
1101 |
ShowText.showIsRealText(word); |
|
1102 |
|
|
1103 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
1104 |
ShowText.showYes(); |
|
1105 |
} |
|
1106 |
else { |
|
1107 |
ShowText.showNo(); |
|
1108 |
fail(); |
|
1109 |
} |
|
1110 |
} |
|
1111 |
|
|
1112 |
/** |
|
1113 |
* A test |
|
1114 |
*/ |
|
1115 |
public void test65() { |
|
1116 |
word = "-"; |
|
1117 |
ShowText.showIsRealWithIntegerExponentText(word); |
|
1118 |
|
|
1119 |
if (StringNumberUtilities.isRealNumberWithIntegerExponent(word)) { |
|
1120 |
ShowText.showYes(); |
|
1121 |
} |
|
1122 |
else { |
|
1123 |
ShowText.showNo(); |
|
1124 |
fail(); |
|
1125 |
} |
|
1126 |
} |
|
1127 |
|
|
1128 |
/** |
|
1129 |
* A test |
|
1130 |
*/ |
|
1131 |
public void test66() { |
|
1132 |
word = "-"; |
|
1133 |
ShowText.showIsRealWithRealExponentText(word); |
|
1134 |
|
|
1135 |
if (StringNumberUtilities.isRealNumberWithRealExponent(word)) { |
|
1136 |
ShowText.showYes(); |
|
1137 |
} |
|
1138 |
else { |
|
1139 |
ShowText.showNo(); |
|
1140 |
fail(); |
|
1141 |
} |
|
1142 |
} |
|
1143 |
|
|
1144 |
/** |
|
1145 |
* A test |
|
1146 |
*/ |
|
1147 |
public void test67() { |
|
1148 |
word = "+"; |
|
1149 |
ShowText.showIsIntegerText(word); |
|
1150 |
|
|
1151 |
if (StringNumberUtilities.isIntegerNumber(word)) { |
|
1152 |
ShowText.showYes(); |
|
1153 |
} |
|
1154 |
else { |
|
1155 |
ShowText.showNo(); |
|
1156 |
fail(); |
|
1157 |
} |
|
1158 |
} |
|
1159 |
|
|
1160 |
/** |
|
1161 |
* A test |
|
1162 |
*/ |
|
1163 |
public void test68() { |
|
1164 |
word = "+"; |
|
1165 |
ShowText.showIsNaturalText(word); |
|
1166 |
|
|
1167 |
if (StringNumberUtilities.isNaturalNumber(word)) { |
|
1168 |
ShowText.showYes(); |
|
1169 |
} |
|
1170 |
else { |
|
1171 |
ShowText.showNo(); |
|
1172 |
fail(); |
|
1173 |
} |
|
1174 |
} |
|
1175 |
|
|
1176 |
/** |
|
1177 |
* A test |
|
1178 |
*/ |
|
1179 |
public void test69() { |
|
1180 |
word = "+"; |
|
1181 |
ShowText.showIsNumberText(word); |
|
1182 |
|
|
1183 |
if (StringNumberUtilities.isNumber(word)) { |
|
1184 |
ShowText.showYes(); |
|
1185 |
} |
|
1186 |
else { |
|
1187 |
ShowText.showNo(); |
|
1188 |
fail(); |
|
1189 |
} |
|
1190 |
} |
|
1191 |
|
|
1192 |
/** |
|
1193 |
* A test |
|
1194 |
*/ |
|
1195 |
public void test70() { |
|
1196 |
word = "+"; |
|
1197 |
ShowText.showIsRealText(word); |
|
1198 |
|
|
1199 |
if (StringNumberUtilities.isRealNumber(word)) { |
|
1200 |
ShowText.showYes(); |
|
1201 |
} |
|
1202 |
else { |
|
1203 |
ShowText.showNo(); |
|
1204 |
fail(); |
|
1205 |
} |
|
1206 |
} |
|
1207 |
|
|
1208 |
/** |
|
1209 |
* A test |
Also available in: Unified diff