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_10) on Sun Apr 27 20:47:19 NZST 2008 -->
|
---|
6 | <TITLE>
|
---|
7 | Pair
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.greenstone.gs3client.data.Pair 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="Pair";
|
---|
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> </TD>
|
---|
38 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
39 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
42 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../org/greenstone/gs3client/data/NodeData.html" title="class in org.greenstone.gs3client.data"><B>PREV CLASS</B></A>
|
---|
55 | <A HREF="../../../../org/greenstone/gs3client/data/ParseUtil.html" title="class in org.greenstone.gs3client.data"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
56 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
57 | <A HREF="../../../../index.html?org/greenstone/gs3client/data/Pair.html" target="_top"><B>FRAMES</B></A>
|
---|
58 | <A HREF="Pair.html" target="_top"><B>NO FRAMES</B></A>
|
---|
59 | <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
76 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
77 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 | org.greenstone.gs3client.data</FONT>
|
---|
88 | <BR>
|
---|
89 | Class Pair</H2>
|
---|
90 | <PRE>
|
---|
91 | java.lang.Object
|
---|
92 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.greenstone.gs3client.data.Pair</B>
|
---|
93 | </PRE>
|
---|
94 | <HR>
|
---|
95 | <DL>
|
---|
96 | <DT><PRE>public class <B>Pair</B><DT>extends java.lang.Object</DL>
|
---|
97 | </PRE>
|
---|
98 |
|
---|
99 | <P>
|
---|
100 | Pair is a simple utility class to represent two associated String values.
|
---|
101 | For instance, a Metadata (name, value) pair to be displayed in either
|
---|
102 | SearchResultsDisplay or BrowseDisplay's metanames and metavalues
|
---|
103 | JLists. (These two classes can be found in org.greenstone.gs3client.)
|
---|
104 | A Comparator--like the one provided by org.greenstone.gs3client.Displays'
|
---|
105 | inner class MetadataComparator--is necessary to ensure that the "natural
|
---|
106 | ordering" of any List of metadata Pairs will be as required. This class
|
---|
107 | does not implement Comparable so that it may be used for other purposes
|
---|
108 | than storing ordered Metadata pairs, which is why using an external
|
---|
109 | Comparator to provide the sorting facility is more useful.
|
---|
110 | <P>
|
---|
111 |
|
---|
112 | <P>
|
---|
113 | <DL>
|
---|
114 | <DT><B>Author:</B></DT>
|
---|
115 | <DD>ak19</DD>
|
---|
116 | </DL>
|
---|
117 | <HR>
|
---|
118 |
|
---|
119 | <P>
|
---|
120 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
121 |
|
---|
122 | <A NAME="field_summary"><!-- --></A>
|
---|
123 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
124 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
125 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
126 | <B>Field Summary</B></FONT></TH>
|
---|
127 | </TR>
|
---|
128 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
129 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
130 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
131 | <TD><CODE><B><A HREF="../../../../org/greenstone/gs3client/data/Pair.html#first">first</A></B></CODE>
|
---|
132 |
|
---|
133 | <BR>
|
---|
134 | first item of the Pair</TD>
|
---|
135 | </TR>
|
---|
136 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
137 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
138 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
139 | <TD><CODE><B><A HREF="../../../../org/greenstone/gs3client/data/Pair.html#second">second</A></B></CODE>
|
---|
140 |
|
---|
141 | <BR>
|
---|
142 | second item of the Pair</TD>
|
---|
143 | </TR>
|
---|
144 | </TABLE>
|
---|
145 |
|
---|
146 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
147 |
|
---|
148 | <A NAME="constructor_summary"><!-- --></A>
|
---|
149 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
150 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
151 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
152 | <B>Constructor Summary</B></FONT></TH>
|
---|
153 | </TR>
|
---|
154 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
155 | <TD><CODE><B><A HREF="../../../../org/greenstone/gs3client/data/Pair.html#Pair(java.lang.String, java.lang.String)">Pair</A></B>(java.lang.String a,
|
---|
156 | java.lang.String b)</CODE>
|
---|
157 |
|
---|
158 | <BR>
|
---|
159 | Constructor that creates a Pair from two String values.</TD>
|
---|
160 | </TR>
|
---|
161 | </TABLE>
|
---|
162 |
|
---|
163 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
164 |
|
---|
165 | <A NAME="method_summary"><!-- --></A>
|
---|
166 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
167 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
168 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
---|
169 | <B>Method Summary</B></FONT></TH>
|
---|
170 | </TR>
|
---|
171 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
172 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
173 | <CODE>static java.lang.String[]</CODE></FONT></TD>
|
---|
174 | <TD><CODE><B><A HREF="../../../../org/greenstone/gs3client/data/Pair.html#getFirst(java.util.Vector)">getFirst</A></B>(java.util.Vector pairs)</CODE>
|
---|
175 |
|
---|
176 | <BR>
|
---|
177 | Given a Vector of Pairs, returns an array of all the first
|
---|
178 | values of each Pair.</TD>
|
---|
179 | </TR>
|
---|
180 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
181 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
182 | <CODE>static java.lang.String[]</CODE></FONT></TD>
|
---|
183 | <TD><CODE><B><A HREF="../../../../org/greenstone/gs3client/data/Pair.html#getSecond(java.util.Vector)">getSecond</A></B>(java.util.Vector pairs)</CODE>
|
---|
184 |
|
---|
185 | <BR>
|
---|
186 | Given a Vector of Pairs, returns an array of all the second
|
---|
187 | values of each Pair.</TD>
|
---|
188 | </TR>
|
---|
189 | </TABLE>
|
---|
190 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
191 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
192 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
193 | <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
---|
194 | </TR>
|
---|
195 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
196 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
197 | </TR>
|
---|
198 | </TABLE>
|
---|
199 |
|
---|
200 | <P>
|
---|
201 |
|
---|
202 | <!-- ============ FIELD DETAIL =========== -->
|
---|
203 |
|
---|
204 | <A NAME="field_detail"><!-- --></A>
|
---|
205 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
206 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
207 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
208 | <B>Field Detail</B></FONT></TH>
|
---|
209 | </TR>
|
---|
210 | </TABLE>
|
---|
211 |
|
---|
212 | <A NAME="first"><!-- --></A><H3>
|
---|
213 | first</H3>
|
---|
214 | <PRE>
|
---|
215 | public final java.lang.String <B>first</B></PRE>
|
---|
216 | <DL>
|
---|
217 | <DD>first item of the Pair
|
---|
218 | <P>
|
---|
219 | <DL>
|
---|
220 | </DL>
|
---|
221 | </DL>
|
---|
222 | <HR>
|
---|
223 |
|
---|
224 | <A NAME="second"><!-- --></A><H3>
|
---|
225 | second</H3>
|
---|
226 | <PRE>
|
---|
227 | public final java.lang.String <B>second</B></PRE>
|
---|
228 | <DL>
|
---|
229 | <DD>second item of the Pair
|
---|
230 | <P>
|
---|
231 | <DL>
|
---|
232 | </DL>
|
---|
233 | </DL>
|
---|
234 |
|
---|
235 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
236 |
|
---|
237 | <A NAME="constructor_detail"><!-- --></A>
|
---|
238 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
239 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
240 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
241 | <B>Constructor Detail</B></FONT></TH>
|
---|
242 | </TR>
|
---|
243 | </TABLE>
|
---|
244 |
|
---|
245 | <A NAME="Pair(java.lang.String, java.lang.String)"><!-- --></A><H3>
|
---|
246 | Pair</H3>
|
---|
247 | <PRE>
|
---|
248 | public <B>Pair</B>(java.lang.String a,
|
---|
249 | java.lang.String b)</PRE>
|
---|
250 | <DL>
|
---|
251 | <DD>Constructor that creates a Pair from two String values.
|
---|
252 | <P>
|
---|
253 | <DL>
|
---|
254 | <DT><B>Parameters:</B><DD><CODE>a</CODE> - - the value for the first item of the Pair<DD><CODE>b</CODE> - - the value for the second item of the Pair.</DL>
|
---|
255 | </DL>
|
---|
256 |
|
---|
257 | <!-- ============ METHOD DETAIL ========== -->
|
---|
258 |
|
---|
259 | <A NAME="method_detail"><!-- --></A>
|
---|
260 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
261 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
262 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
---|
263 | <B>Method Detail</B></FONT></TH>
|
---|
264 | </TR>
|
---|
265 | </TABLE>
|
---|
266 |
|
---|
267 | <A NAME="getFirst(java.util.Vector)"><!-- --></A><H3>
|
---|
268 | getFirst</H3>
|
---|
269 | <PRE>
|
---|
270 | public static java.lang.String[] <B>getFirst</B>(java.util.Vector pairs)</PRE>
|
---|
271 | <DL>
|
---|
272 | <DD>Given a Vector of Pairs, returns an array of all the first
|
---|
273 | values of each Pair.
|
---|
274 | <P>
|
---|
275 | <DD><DL>
|
---|
276 |
|
---|
277 | <DT><B>Returns:</B><DD>all the first fields in a Vector of pairs as an array.</DL>
|
---|
278 | </DD>
|
---|
279 | </DL>
|
---|
280 | <HR>
|
---|
281 |
|
---|
282 | <A NAME="getSecond(java.util.Vector)"><!-- --></A><H3>
|
---|
283 | getSecond</H3>
|
---|
284 | <PRE>
|
---|
285 | public static java.lang.String[] <B>getSecond</B>(java.util.Vector pairs)</PRE>
|
---|
286 | <DL>
|
---|
287 | <DD>Given a Vector of Pairs, returns an array of all the second
|
---|
288 | values of each Pair.
|
---|
289 | <P>
|
---|
290 | <DD><DL>
|
---|
291 |
|
---|
292 | <DT><B>Returns:</B><DD>all the second fields in a Vector of pairs as an array.</DL>
|
---|
293 | </DD>
|
---|
294 | </DL>
|
---|
295 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
296 | <HR>
|
---|
297 |
|
---|
298 |
|
---|
299 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
300 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
301 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
302 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
303 | <TR>
|
---|
304 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
305 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
306 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
307 | <TR ALIGN="center" VALIGN="top">
|
---|
308 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
309 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
310 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
311 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
312 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
313 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
314 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
315 | </TR>
|
---|
316 | </TABLE>
|
---|
317 | </TD>
|
---|
318 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
319 | </EM>
|
---|
320 | </TD>
|
---|
321 | </TR>
|
---|
322 |
|
---|
323 | <TR>
|
---|
324 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
325 | <A HREF="../../../../org/greenstone/gs3client/data/NodeData.html" title="class in org.greenstone.gs3client.data"><B>PREV CLASS</B></A>
|
---|
326 | <A HREF="../../../../org/greenstone/gs3client/data/ParseUtil.html" title="class in org.greenstone.gs3client.data"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
327 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
328 | <A HREF="../../../../index.html?org/greenstone/gs3client/data/Pair.html" target="_top"><B>FRAMES</B></A>
|
---|
329 | <A HREF="Pair.html" target="_top"><B>NO FRAMES</B></A>
|
---|
330 | <SCRIPT type="text/javascript">
|
---|
331 | <!--
|
---|
332 | if(window==top) {
|
---|
333 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
334 | }
|
---|
335 | //-->
|
---|
336 | </SCRIPT>
|
---|
337 | <NOSCRIPT>
|
---|
338 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
339 | </NOSCRIPT>
|
---|
340 |
|
---|
341 |
|
---|
342 | </FONT></TD>
|
---|
343 | </TR>
|
---|
344 | <TR>
|
---|
345 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
346 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
347 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
348 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
349 | </TR>
|
---|
350 | </TABLE>
|
---|
351 | <A NAME="skip-navbar_bottom"></A>
|
---|
352 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
353 |
|
---|
354 | <HR>
|
---|
355 |
|
---|
356 | </BODY>
|
---|
357 | </HTML>
|
---|