commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r919363 [42/44] - in /websites/production/commons/content/proper/commons-csv: ./ apidocs/ apidocs/org/apache/commons/csv/ apidocs/org/apache/commons/csv/class-use/ apidocs/resources/ apidocs/src-html/org/apache/commons/csv/ jacoco/ jacoco/....
Date Thu, 14 Aug 2014 19:48:09 GMT
Modified: websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVRecord.html
==============================================================================
--- websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVRecord.html
(original)
+++ websites/production/commons/content/proper/commons-csv/xref/org/apache/commons/csv/CSVRecord.html
Thu Aug 14 19:48:06 2014
@@ -131,108 +131,127 @@
 <a class="jxr_linenumber" name="L123" href="#L123">123</a>     <em class="jxr_javadoccomment">/**</em>
 <a class="jxr_linenumber" name="L124" href="#L124">124</a> <em class="jxr_javadoccomment">
    * Returns the number of this record in the parsed CSV file.</em>
 <a class="jxr_linenumber" name="L125" href="#L125">125</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L126" href="#L126">126</a> <em class="jxr_javadoccomment">
    * @return the number of this record.</em>
-<a class="jxr_linenumber" name="L127" href="#L127">127</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L128" href="#L128">128</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">long</strong> getRecordNumber() {
-<a class="jxr_linenumber" name="L129" href="#L129">129</a>         <strong
class="jxr_keyword">return</strong> recordNumber;
-<a class="jxr_linenumber" name="L130" href="#L130">130</a>     }
-<a class="jxr_linenumber" name="L131" href="#L131">131</a> 
-<a class="jxr_linenumber" name="L132" href="#L132">132</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L133" href="#L133">133</a> <em class="jxr_javadoccomment">
    * Returns true if this record is consistent, false if not. Currently, the only check is
matching the record size to</em>
-<a class="jxr_linenumber" name="L134" href="#L134">134</a> <em class="jxr_javadoccomment">
    * the header size. Some programs can export files that fails this test but still produce
parsable files.</em>
-<a class="jxr_linenumber" name="L135" href="#L135">135</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L136" href="#L136">136</a> <em class="jxr_javadoccomment">
    * @return true of this record is valid, false if not</em>
-<a class="jxr_linenumber" name="L137" href="#L137">137</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L138" href="#L138">138</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isConsistent() {
-<a class="jxr_linenumber" name="L139" href="#L139">139</a>         <strong
class="jxr_keyword">return</strong> mapping == <strong class="jxr_keyword">null</strong>
? <strong class="jxr_keyword">true</strong> : mapping.size() == values.length;
-<a class="jxr_linenumber" name="L140" href="#L140">140</a>     }
-<a class="jxr_linenumber" name="L141" href="#L141">141</a> 
-<a class="jxr_linenumber" name="L142" href="#L142">142</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L143" href="#L143">143</a> <em class="jxr_javadoccomment">
    * Checks whether a given column is mapped, i.e. its name has been defined to the parser.</em>
-<a class="jxr_linenumber" name="L144" href="#L144">144</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L145" href="#L145">145</a> <em class="jxr_javadoccomment">
    * @param name</em>
-<a class="jxr_linenumber" name="L146" href="#L146">146</a> <em class="jxr_javadoccomment">
    *            the name of the column to be retrieved.</em>
-<a class="jxr_linenumber" name="L147" href="#L147">147</a> <em class="jxr_javadoccomment">
    * @return whether a given column is mapped.</em>
-<a class="jxr_linenumber" name="L148" href="#L148">148</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L149" href="#L149">149</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isMapped(<strong class="jxr_keyword">final</strong>
String name) {
-<a class="jxr_linenumber" name="L150" href="#L150">150</a>         <strong
class="jxr_keyword">return</strong> mapping != <strong class="jxr_keyword">null</strong>
? mapping.containsKey(name) : false;
-<a class="jxr_linenumber" name="L151" href="#L151">151</a>     }
-<a class="jxr_linenumber" name="L152" href="#L152">152</a> 
-<a class="jxr_linenumber" name="L153" href="#L153">153</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L154" href="#L154">154</a> <em class="jxr_javadoccomment">
    * Checks whether a given columns is mapped and has a value.</em>
-<a class="jxr_linenumber" name="L155" href="#L155">155</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L156" href="#L156">156</a> <em class="jxr_javadoccomment">
    * @param name</em>
-<a class="jxr_linenumber" name="L157" href="#L157">157</a> <em class="jxr_javadoccomment">
    *            the name of the column to be retrieved.</em>
-<a class="jxr_linenumber" name="L158" href="#L158">158</a> <em class="jxr_javadoccomment">
    * @return whether a given columns is mapped and has a value</em>
-<a class="jxr_linenumber" name="L159" href="#L159">159</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L160" href="#L160">160</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isSet(<strong class="jxr_keyword">final</strong>
String name) {
-<a class="jxr_linenumber" name="L161" href="#L161">161</a>         <strong
class="jxr_keyword">return</strong> isMapped(name) &amp;&amp; mapping.get(name).intValue()
&lt; values.length;
-<a class="jxr_linenumber" name="L162" href="#L162">162</a>     }
-<a class="jxr_linenumber" name="L163" href="#L163">163</a> 
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L165" href="#L165">165</a> <em class="jxr_javadoccomment">
    * Returns an iterator over the values of this record.</em>
-<a class="jxr_linenumber" name="L166" href="#L166">166</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L167" href="#L167">167</a> <em class="jxr_javadoccomment">
    * @return an iterator over the values of this record.</em>
-<a class="jxr_linenumber" name="L168" href="#L168">168</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L169" href="#L169">169</a>     <strong class="jxr_keyword">public</strong>
Iterator&lt;String&gt; iterator() {
-<a class="jxr_linenumber" name="L170" href="#L170">170</a>         <strong
class="jxr_keyword">return</strong> toList().iterator();
-<a class="jxr_linenumber" name="L171" href="#L171">171</a>     }
-<a class="jxr_linenumber" name="L172" href="#L172">172</a> 
-<a class="jxr_linenumber" name="L173" href="#L173">173</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L174" href="#L174">174</a> <em class="jxr_javadoccomment">
    * Puts all values of this record into the given Map.</em>
-<a class="jxr_linenumber" name="L175" href="#L175">175</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L176" href="#L176">176</a> <em class="jxr_javadoccomment">
    * @param map The Map to populate.</em>
-<a class="jxr_linenumber" name="L177" href="#L177">177</a> <em class="jxr_javadoccomment">
    * @return the given map.</em>
+<a class="jxr_linenumber" name="L126" href="#L126">126</a> <em class="jxr_javadoccomment">
    * &lt;p&gt;</em>
+<a class="jxr_linenumber" name="L127" href="#L127">127</a> <em class="jxr_javadoccomment">
    * &lt;strong&gt;ATTENTION:&lt;/strong&gt; If your CSV input has multi-line
values, the returned number does not correspond to</em>
+<a class="jxr_linenumber" name="L128" href="#L128">128</a> <em class="jxr_javadoccomment">
    * the current line number of the parser that created this record.</em>
+<a class="jxr_linenumber" name="L129" href="#L129">129</a> <em class="jxr_javadoccomment">
    * &lt;/p&gt;</em>
+<a class="jxr_linenumber" name="L130" href="#L130">130</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L131" href="#L131">131</a> <em class="jxr_javadoccomment">
    * @return the number of this record.</em>
+<a class="jxr_linenumber" name="L132" href="#L132">132</a> <em class="jxr_javadoccomment">
    * @see CSVParser#getCurrentLineNumber()</em>
+<a class="jxr_linenumber" name="L133" href="#L133">133</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L134" href="#L134">134</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">long</strong> getRecordNumber() {
+<a class="jxr_linenumber" name="L135" href="#L135">135</a>         <strong
class="jxr_keyword">return</strong> recordNumber;
+<a class="jxr_linenumber" name="L136" href="#L136">136</a>     }
+<a class="jxr_linenumber" name="L137" href="#L137">137</a> 
+<a class="jxr_linenumber" name="L138" href="#L138">138</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L139" href="#L139">139</a> <em class="jxr_javadoccomment">
    * Tells whether the record size matches the header size.</em>
+<a class="jxr_linenumber" name="L140" href="#L140">140</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L141" href="#L141">141</a> <em class="jxr_javadoccomment">
    * &lt;p&gt;</em>
+<a class="jxr_linenumber" name="L142" href="#L142">142</a> <em class="jxr_javadoccomment">
    * Returns true if the sizes for this record match and false if not. Some programs can
export files that fail this</em>
+<a class="jxr_linenumber" name="L143" href="#L143">143</a> <em class="jxr_javadoccomment">
    * test but still produce parsable files.</em>
+<a class="jxr_linenumber" name="L144" href="#L144">144</a> <em class="jxr_javadoccomment">
    * &lt;/p&gt;</em>
+<a class="jxr_linenumber" name="L145" href="#L145">145</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L146" href="#L146">146</a> <em class="jxr_javadoccomment">
    * @return true of this record is valid, false if not</em>
+<a class="jxr_linenumber" name="L147" href="#L147">147</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L148" href="#L148">148</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isConsistent() {
+<a class="jxr_linenumber" name="L149" href="#L149">149</a>         <strong
class="jxr_keyword">return</strong> mapping == <strong class="jxr_keyword">null</strong>
|| mapping.size() == values.length;
+<a class="jxr_linenumber" name="L150" href="#L150">150</a>     }
+<a class="jxr_linenumber" name="L151" href="#L151">151</a> 
+<a class="jxr_linenumber" name="L152" href="#L152">152</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L153" href="#L153">153</a> <em class="jxr_javadoccomment">
    * Checks whether a given column is mapped, i.e. its name has been defined to the parser.</em>
+<a class="jxr_linenumber" name="L154" href="#L154">154</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L155" href="#L155">155</a> <em class="jxr_javadoccomment">
    * @param name</em>
+<a class="jxr_linenumber" name="L156" href="#L156">156</a> <em class="jxr_javadoccomment">
    *            the name of the column to be retrieved.</em>
+<a class="jxr_linenumber" name="L157" href="#L157">157</a> <em class="jxr_javadoccomment">
    * @return whether a given column is mapped.</em>
+<a class="jxr_linenumber" name="L158" href="#L158">158</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L159" href="#L159">159</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isMapped(<strong class="jxr_keyword">final</strong>
String name) {
+<a class="jxr_linenumber" name="L160" href="#L160">160</a>         <strong
class="jxr_keyword">return</strong> mapping != <strong class="jxr_keyword">null</strong>
&amp;&amp; mapping.containsKey(name);
+<a class="jxr_linenumber" name="L161" href="#L161">161</a>     }
+<a class="jxr_linenumber" name="L162" href="#L162">162</a> 
+<a class="jxr_linenumber" name="L163" href="#L163">163</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L164" href="#L164">164</a> <em class="jxr_javadoccomment">
    * Checks whether a given columns is mapped and has a value.</em>
+<a class="jxr_linenumber" name="L165" href="#L165">165</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L166" href="#L166">166</a> <em class="jxr_javadoccomment">
    * @param name</em>
+<a class="jxr_linenumber" name="L167" href="#L167">167</a> <em class="jxr_javadoccomment">
    *            the name of the column to be retrieved.</em>
+<a class="jxr_linenumber" name="L168" href="#L168">168</a> <em class="jxr_javadoccomment">
    * @return whether a given columns is mapped and has a value</em>
+<a class="jxr_linenumber" name="L169" href="#L169">169</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L170" href="#L170">170</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">boolean</strong> isSet(<strong class="jxr_keyword">final</strong>
String name) {
+<a class="jxr_linenumber" name="L171" href="#L171">171</a>         <strong
class="jxr_keyword">return</strong> isMapped(name) &amp;&amp; mapping.get(name).intValue()
&lt; values.length;
+<a class="jxr_linenumber" name="L172" href="#L172">172</a>     }
+<a class="jxr_linenumber" name="L173" href="#L173">173</a> 
+<a class="jxr_linenumber" name="L174" href="#L174">174</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L175" href="#L175">175</a> <em class="jxr_javadoccomment">
    * Returns an iterator over the values of this record.</em>
+<a class="jxr_linenumber" name="L176" href="#L176">176</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L177" href="#L177">177</a> <em class="jxr_javadoccomment">
    * @return an iterator over the values of this record.</em>
 <a class="jxr_linenumber" name="L178" href="#L178">178</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L179" href="#L179">179</a>     &lt;M <strong
class="jxr_keyword">extends</strong> Map&lt;String, String&gt;&gt; M
putIn(<strong class="jxr_keyword">final</strong> M map) {
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>         <strong
class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong>
Entry&lt;String, Integer&gt; entry : mapping.entrySet()) {
-<a class="jxr_linenumber" name="L181" href="#L181">181</a>             <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>
col = entry.getValue().intValue();
-<a class="jxr_linenumber" name="L182" href="#L182">182</a>             <strong
class="jxr_keyword">if</strong> (col &lt; values.length) {
-<a class="jxr_linenumber" name="L183" href="#L183">183</a>                 map.put(entry.getKey(),
values[col]);
-<a class="jxr_linenumber" name="L184" href="#L184">184</a>             }
-<a class="jxr_linenumber" name="L185" href="#L185">185</a>         }
-<a class="jxr_linenumber" name="L186" href="#L186">186</a>         <strong
class="jxr_keyword">return</strong> map;
-<a class="jxr_linenumber" name="L187" href="#L187">187</a>     }
-<a class="jxr_linenumber" name="L188" href="#L188">188</a> 
-<a class="jxr_linenumber" name="L189" href="#L189">189</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L190" href="#L190">190</a> <em class="jxr_javadoccomment">
    * Returns the number of values in this record.</em>
-<a class="jxr_linenumber" name="L191" href="#L191">191</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L192" href="#L192">192</a> <em class="jxr_javadoccomment">
    * @return the number of values.</em>
-<a class="jxr_linenumber" name="L193" href="#L193">193</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">int</strong> size() {
-<a class="jxr_linenumber" name="L195" href="#L195">195</a>         <strong
class="jxr_keyword">return</strong> values.length;
-<a class="jxr_linenumber" name="L196" href="#L196">196</a>     }
-<a class="jxr_linenumber" name="L197" href="#L197">197</a> 
-<a class="jxr_linenumber" name="L198" href="#L198">198</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L199" href="#L199">199</a> <em class="jxr_javadoccomment">
    * Converts the values to a List.</em>
-<a class="jxr_linenumber" name="L200" href="#L200">200</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L201" href="#L201">201</a> <em class="jxr_javadoccomment">
    * TODO: Maybe make this public?</em>
-<a class="jxr_linenumber" name="L202" href="#L202">202</a> <em class="jxr_javadoccomment">
    * @return a new List</em>
-<a class="jxr_linenumber" name="L203" href="#L203">203</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L204" href="#L204">204</a>     <strong class="jxr_keyword">private</strong>
List&lt;String&gt; toList() {
-<a class="jxr_linenumber" name="L205" href="#L205">205</a>         <strong
class="jxr_keyword">return</strong> Arrays.asList(values);
-<a class="jxr_linenumber" name="L206" href="#L206">206</a>     }
-<a class="jxr_linenumber" name="L207" href="#L207">207</a> 
-<a class="jxr_linenumber" name="L208" href="#L208">208</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L209" href="#L209">209</a> <em class="jxr_javadoccomment">
    * Copies this record into a new Map. The new map is not connect</em>
-<a class="jxr_linenumber" name="L210" href="#L210">210</a> <em class="jxr_javadoccomment">
    *</em>
-<a class="jxr_linenumber" name="L211" href="#L211">211</a> <em class="jxr_javadoccomment">
    * @return A new Map. The map is empty if the record has no headers.</em>
-<a class="jxr_linenumber" name="L212" href="#L212">212</a> <em class="jxr_javadoccomment">
    */</em>
-<a class="jxr_linenumber" name="L213" href="#L213">213</a>     <strong class="jxr_keyword">public</strong>
Map&lt;String, String&gt; toMap() {
-<a class="jxr_linenumber" name="L214" href="#L214">214</a>         <strong
class="jxr_keyword">return</strong> putIn(<strong class="jxr_keyword">new</strong>
HashMap&lt;String, String&gt;(values.length));
-<a class="jxr_linenumber" name="L215" href="#L215">215</a>     }
-<a class="jxr_linenumber" name="L216" href="#L216">216</a> 
-<a class="jxr_linenumber" name="L217" href="#L217">217</a>     @Override
-<a class="jxr_linenumber" name="L218" href="#L218">218</a>     <strong class="jxr_keyword">public</strong>
String toString() {
-<a class="jxr_linenumber" name="L219" href="#L219">219</a>         <strong
class="jxr_keyword">return</strong> Arrays.toString(values);
-<a class="jxr_linenumber" name="L220" href="#L220">220</a>     }
-<a class="jxr_linenumber" name="L221" href="#L221">221</a> 
-<a class="jxr_linenumber" name="L222" href="#L222">222</a>     String[] values()
{
-<a class="jxr_linenumber" name="L223" href="#L223">223</a>         <strong
class="jxr_keyword">return</strong> values;
-<a class="jxr_linenumber" name="L224" href="#L224">224</a>     }
-<a class="jxr_linenumber" name="L225" href="#L225">225</a> 
-<a class="jxr_linenumber" name="L226" href="#L226">226</a> 
-<a class="jxr_linenumber" name="L227" href="#L227">227</a> }
+<a class="jxr_linenumber" name="L179" href="#L179">179</a>     <strong class="jxr_keyword">public</strong>
Iterator&lt;String&gt; iterator() {
+<a class="jxr_linenumber" name="L180" href="#L180">180</a>         <strong
class="jxr_keyword">return</strong> toList().iterator();
+<a class="jxr_linenumber" name="L181" href="#L181">181</a>     }
+<a class="jxr_linenumber" name="L182" href="#L182">182</a> 
+<a class="jxr_linenumber" name="L183" href="#L183">183</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L184" href="#L184">184</a> <em class="jxr_javadoccomment">
    * Puts all values of this record into the given Map.</em>
+<a class="jxr_linenumber" name="L185" href="#L185">185</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L186" href="#L186">186</a> <em class="jxr_javadoccomment">
    * @param map The Map to populate.</em>
+<a class="jxr_linenumber" name="L187" href="#L187">187</a> <em class="jxr_javadoccomment">
    * @return the given map.</em>
+<a class="jxr_linenumber" name="L188" href="#L188">188</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L189" href="#L189">189</a>     &lt;M <strong
class="jxr_keyword">extends</strong> Map&lt;String, String&gt;&gt; M
putIn(<strong class="jxr_keyword">final</strong> M map) {
+<a class="jxr_linenumber" name="L190" href="#L190">190</a>         <strong
class="jxr_keyword">if</strong> (mapping == <strong class="jxr_keyword">null</strong>)
{
+<a class="jxr_linenumber" name="L191" href="#L191">191</a>             <strong
class="jxr_keyword">return</strong> map;
+<a class="jxr_linenumber" name="L192" href="#L192">192</a>         }
+<a class="jxr_linenumber" name="L193" href="#L193">193</a>         <strong
class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong>
Entry&lt;String, Integer&gt; entry : mapping.entrySet()) {
+<a class="jxr_linenumber" name="L194" href="#L194">194</a>             <strong
class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong>
col = entry.getValue().intValue();
+<a class="jxr_linenumber" name="L195" href="#L195">195</a>             <strong
class="jxr_keyword">if</strong> (col &lt; values.length) {
+<a class="jxr_linenumber" name="L196" href="#L196">196</a>                 map.put(entry.getKey(),
values[col]);
+<a class="jxr_linenumber" name="L197" href="#L197">197</a>             }
+<a class="jxr_linenumber" name="L198" href="#L198">198</a>         }
+<a class="jxr_linenumber" name="L199" href="#L199">199</a>         <strong
class="jxr_keyword">return</strong> map;
+<a class="jxr_linenumber" name="L200" href="#L200">200</a>     }
+<a class="jxr_linenumber" name="L201" href="#L201">201</a> 
+<a class="jxr_linenumber" name="L202" href="#L202">202</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L203" href="#L203">203</a> <em class="jxr_javadoccomment">
    * Returns the number of values in this record.</em>
+<a class="jxr_linenumber" name="L204" href="#L204">204</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L205" href="#L205">205</a> <em class="jxr_javadoccomment">
    * @return the number of values.</em>
+<a class="jxr_linenumber" name="L206" href="#L206">206</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L207" href="#L207">207</a>     <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">int</strong> size() {
+<a class="jxr_linenumber" name="L208" href="#L208">208</a>         <strong
class="jxr_keyword">return</strong> values.length;
+<a class="jxr_linenumber" name="L209" href="#L209">209</a>     }
+<a class="jxr_linenumber" name="L210" href="#L210">210</a> 
+<a class="jxr_linenumber" name="L211" href="#L211">211</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L212" href="#L212">212</a> <em class="jxr_javadoccomment">
    * Converts the values to a List.</em>
+<a class="jxr_linenumber" name="L213" href="#L213">213</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L214" href="#L214">214</a> <em class="jxr_javadoccomment">
    * TODO: Maybe make this public?</em>
+<a class="jxr_linenumber" name="L215" href="#L215">215</a> <em class="jxr_javadoccomment">
    * @return a new List</em>
+<a class="jxr_linenumber" name="L216" href="#L216">216</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L217" href="#L217">217</a>     <strong class="jxr_keyword">private</strong>
List&lt;String&gt; toList() {
+<a class="jxr_linenumber" name="L218" href="#L218">218</a>         <strong
class="jxr_keyword">return</strong> Arrays.asList(values);
+<a class="jxr_linenumber" name="L219" href="#L219">219</a>     }
+<a class="jxr_linenumber" name="L220" href="#L220">220</a> 
+<a class="jxr_linenumber" name="L221" href="#L221">221</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L222" href="#L222">222</a> <em class="jxr_javadoccomment">
    * Copies this record into a new Map. The new map is not connect</em>
+<a class="jxr_linenumber" name="L223" href="#L223">223</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L224" href="#L224">224</a> <em class="jxr_javadoccomment">
    * @return A new Map. The map is empty if the record has no headers.</em>
+<a class="jxr_linenumber" name="L225" href="#L225">225</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L226" href="#L226">226</a>     <strong class="jxr_keyword">public</strong>
Map&lt;String, String&gt; toMap() {
+<a class="jxr_linenumber" name="L227" href="#L227">227</a>         <strong
class="jxr_keyword">return</strong> putIn(<strong class="jxr_keyword">new</strong>
HashMap&lt;String, String&gt;(values.length));
+<a class="jxr_linenumber" name="L228" href="#L228">228</a>     }
+<a class="jxr_linenumber" name="L229" href="#L229">229</a> 
+<a class="jxr_linenumber" name="L230" href="#L230">230</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L231" href="#L231">231</a> <em class="jxr_javadoccomment">
    * Returns a string representation of the contents of this record. The result is constructed
by passing the internal</em>
+<a class="jxr_linenumber" name="L232" href="#L232">232</a> <em class="jxr_javadoccomment">
    * values array to {@link Arrays#toString(Object[])}.</em>
+<a class="jxr_linenumber" name="L233" href="#L233">233</a> <em class="jxr_javadoccomment">
    *</em>
+<a class="jxr_linenumber" name="L234" href="#L234">234</a> <em class="jxr_javadoccomment">
    * @return a String representation of this record.</em>
+<a class="jxr_linenumber" name="L235" href="#L235">235</a> <em class="jxr_javadoccomment">
    */</em>
+<a class="jxr_linenumber" name="L236" href="#L236">236</a>     @Override
+<a class="jxr_linenumber" name="L237" href="#L237">237</a>     <strong class="jxr_keyword">public</strong>
String toString() {
+<a class="jxr_linenumber" name="L238" href="#L238">238</a>         <strong
class="jxr_keyword">return</strong> Arrays.toString(values);
+<a class="jxr_linenumber" name="L239" href="#L239">239</a>     }
+<a class="jxr_linenumber" name="L240" href="#L240">240</a> 
+<a class="jxr_linenumber" name="L241" href="#L241">241</a>     String[] values()
{
+<a class="jxr_linenumber" name="L242" href="#L242">242</a>         <strong
class="jxr_keyword">return</strong> values;
+<a class="jxr_linenumber" name="L243" href="#L243">243</a>     }
+<a class="jxr_linenumber" name="L244" href="#L244">244</a> 
+<a class="jxr_linenumber" name="L245" href="#L245">245</a> 
+<a class="jxr_linenumber" name="L246" href="#L246">246</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2014 <a href="http://www.apache.org/">The
Apache Software Foundation</a>. All rights reserved.</div>



Mime
View raw message