source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/util/GenericsUtil.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 15.7 KB
Line 
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.6.0_07) on Tue Sep 01 20:56:55 UTC 2009 -->
6<TITLE>
7GenericsUtil (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="GenericsUtil (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GenericsUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/util/GenericOptionsParser.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/util/HeapSort.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/util/GenericsUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="GenericsUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.util</FONT>
92<BR>
93Class GenericsUtil</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.util.GenericsUtil</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>GenericsUtil</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104Contains utility methods for dealing with Java Generics.
105<P>
106
107<P>
108<HR>
109
110<P>
111
112<!-- ======== CONSTRUCTOR SUMMARY ======== -->
113
114<A NAME="constructor_summary"><!-- --></A>
115<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
116<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
117<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
118<B>Constructor Summary</B></FONT></TH>
119</TR>
120<TR BGCOLOR="white" CLASS="TableRowColor">
121<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/GenericsUtil.html#GenericsUtil()">GenericsUtil</A></B>()</CODE>
122
123<BR>
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
125</TR>
126</TABLE>
127&nbsp;
128<!-- ========== METHOD SUMMARY =========== -->
129
130<A NAME="method_summary"><!-- --></A>
131<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
132<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
133<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
134<B>Method Summary</B></FONT></TH>
135</TR>
136<TR BGCOLOR="white" CLASS="TableRowColor">
137<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
138<CODE>static
139<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
140<TR ALIGN="right" VALIGN="">
141<TD NOWRAP><FONT SIZE="-1">
142<CODE>&lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;</CODE></FONT></TD>
143</TR>
144</TABLE>
145</CODE></FONT></TD>
146<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/GenericsUtil.html#getClass(T)">getClass</A></B>(T&nbsp;t)</CODE>
147
148<BR>
149&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Class object (of type <code>Class&lt;T&gt;</code>) of the 
150 argument of type <code>T</code>.</TD>
151</TR>
152<TR BGCOLOR="white" CLASS="TableRowColor">
153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154<CODE>static
155<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
156<TR ALIGN="right" VALIGN="">
157<TD NOWRAP><FONT SIZE="-1">
158<CODE>&lt;T&gt; T[]</CODE></FONT></TD>
159</TR>
160</TABLE>
161</CODE></FONT></TD>
162<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/GenericsUtil.html#toArray(java.lang.Class, java.util.List)">toArray</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;c,
163        <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;T&gt;&nbsp;list)</CODE>
164
165<BR>
166&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the given <code>List&lt;T&gt;</code> to a an array of
167 <code>T[]</code>.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>static
172<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
173<TR ALIGN="right" VALIGN="">
174<TD NOWRAP><FONT SIZE="-1">
175<CODE>&lt;T&gt; T[]</CODE></FONT></TD>
176</TR>
177</TABLE>
178</CODE></FONT></TD>
179<TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/GenericsUtil.html#toArray(java.util.List)">toArray</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;T&gt;&nbsp;list)</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the given <code>List&lt;T&gt;</code> to a an array of
183 <code>T[]</code>.</TD>
184</TR>
185</TABLE>
186&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
187<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
188<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
189<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
193</TR>
194</TABLE>
195&nbsp;
196<P>
197
198<!-- ========= CONSTRUCTOR DETAIL ======== -->
199
200<A NAME="constructor_detail"><!-- --></A>
201<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
202<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
203<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
204<B>Constructor Detail</B></FONT></TH>
205</TR>
206</TABLE>
207
208<A NAME="GenericsUtil()"><!-- --></A><H3>
209GenericsUtil</H3>
210<PRE>
211public <B>GenericsUtil</B>()</PRE>
212<DL>
213</DL>
214
215<!-- ============ METHOD DETAIL ========== -->
216
217<A NAME="method_detail"><!-- --></A>
218<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
219<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
220<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
221<B>Method Detail</B></FONT></TH>
222</TR>
223</TABLE>
224
225<A NAME="getClass(java.lang.Object)"><!-- --></A><A NAME="getClass(T)"><!-- --></A><H3>
226getClass</H3>
227<PRE>
228public static &lt;T&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt; <B>getClass</B>(T&nbsp;t)</PRE>
229<DL>
230<DD>Returns the Class object (of type <code>Class&lt;T&gt;</code>) of the 
231 argument of type <code>T</code>.
232<P>
233<DD><DL>
234<DT><B>Type Parameters:</B><DD><CODE>T</CODE> - The type of the argument<DT><B>Parameters:</B><DD><CODE>t</CODE> - the object to get it class
235<DT><B>Returns:</B><DD><code>Class&lt;T&gt;</code></DL>
236</DD>
237</DL>
238<HR>
239
240<A NAME="toArray(java.lang.Class, java.util.List)"><!-- --></A><H3>
241toArray</H3>
242<PRE>
243public static &lt;T&gt; T[] <B>toArray</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;c,
244                              <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;T&gt;&nbsp;list)</PRE>
245<DL>
246<DD>Converts the given <code>List&lt;T&gt;</code> to a an array of
247 <code>T[]</code>.
248<P>
249<DD><DL>
250<DT><B>Parameters:</B><DD><CODE>c</CODE> - the Class object of the items in the list<DD><CODE>list</CODE> - the list to convert</DL>
251</DD>
252</DL>
253<HR>
254
255<A NAME="toArray(java.util.List)"><!-- --></A><H3>
256toArray</H3>
257<PRE>
258public static &lt;T&gt; T[] <B>toArray</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;T&gt;&nbsp;list)</PRE>
259<DL>
260<DD>Converts the given <code>List&lt;T&gt;</code> to a an array of
261 <code>T[]</code>.
262<P>
263<DD><DL>
264<DT><B>Parameters:</B><DD><CODE>list</CODE> - the list to convert
265<DT><B>Throws:</B>
266<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ArrayIndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">ArrayIndexOutOfBoundsException</A></CODE> - if the list is empty.
267 Use <A HREF="../../../../org/apache/hadoop/util/GenericsUtil.html#toArray(java.lang.Class, java.util.List)"><CODE>toArray(Class, List)</CODE></A> if the list may be empty.</DL>
268</DD>
269</DL>
270<!-- ========= END OF CLASS DATA ========= -->
271<HR>
272
273
274<!-- ======= START OF BOTTOM NAVBAR ====== -->
275<A NAME="navbar_bottom"><!-- --></A>
276<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
277<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
278<TR>
279<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
280<A NAME="navbar_bottom_firstrow"><!-- --></A>
281<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
282  <TR ALIGN="center" VALIGN="top">
283  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
284  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
285  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
286  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GenericsUtil.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
287  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
288  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
289  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
290  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
291  </TR>
292</TABLE>
293</TD>
294<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
295</EM>
296</TD>
297</TR>
298
299<TR>
300<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
301&nbsp;<A HREF="../../../../org/apache/hadoop/util/GenericOptionsParser.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A>&nbsp;
302&nbsp;<A HREF="../../../../org/apache/hadoop/util/HeapSort.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD>
303<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
304  <A HREF="../../../../index.html?org/apache/hadoop/util/GenericsUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
305&nbsp;<A HREF="GenericsUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
306&nbsp;<SCRIPT type="text/javascript">
307  <!--
308  if(window==top) {
309    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
310  }
311  //-->
312</SCRIPT>
313<NOSCRIPT>
314  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
315</NOSCRIPT>
316
317
318</FONT></TD>
319</TR>
320<TR>
321<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
322  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
323<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
324DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
325</TR>
326</TABLE>
327<A NAME="skip-navbar_bottom"></A>
328<!-- ======== END OF BOTTOM NAVBAR ======= -->
329
330<HR>
331Copyright &copy; 2009 The Apache Software Foundation
332</BODY>
333</HTML>
Note: See TracBrowser for help on using the repository browser.