Lines Matching full:code
104 Static utility methods pertaining to <code>float</code> primitives, that are not
105 already found in either <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang"><CODE>Float</CODE></A> or <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html?is-external=true" title="class or interface in java.util"><CODE>Arrays</CODE></A>.
129 <CODE>static <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><<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</A>></CODE></FONT></TD>
130 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#asList(float...)">asList</A></B>(float... backingArray)</CODE>
133 Returns a fixed-size list backed by the specified array, similar to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html?is-external=true#asList(T...)" title="class or interface in java.util"><CODE>Arrays.asList(Object[])</CODE></A>.</TD>
137 <CODE>static int</CODE></FONT></TD>
138 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#compare(float, float)">compare</A></B>(float a,
139 float b)</CODE>
142 Compares the two specified <code>float</code> values using <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#compare(float, float)" title="class or interface in java.lang"><CODE>Float.compare(float, float)</CODE></A>.</TD>
146 <CODE>static float[]</CODE></FONT></TD>
147 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#concat(float[]...)">concat</A></B>(float[]... arrays)</CODE>
154 <CODE>static boolean</CODE></FONT></TD>
155 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#contains(float[], float)">contains</A></B>(float[] array,
156 float target)</CODE>
159 Returns <code>true</code> if <code>target</code> is present as an element anywhere in
160 <code>array</code>.</TD>
164 <CODE>static float[]</CODE></FONT></TD>
165 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#ensureCapacity(float[], int, int)">ensureCapacity</A></B>(float[] array,
167 int padding)</CODE>
170 Returns an array containing the same values as <code>array</code>, but
175 <CODE>static int</CODE></FONT></TD>
176 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#hashCode(float)">hashCode</A></B>(float value)</CODE>
179 Returns a hash code for <code>value</code>; equal to the result of invoking
180 <code>((Float) value).hashCode()</code>.</TD>
184 <CODE>static int</CODE></FONT></TD>
185 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#indexOf(float[], float)">indexOf</A></B>(float[] array,
186 float target)</CODE>
189 Returns the index of the first appearance of the value <code>target</code> in
190 <code>array</code>.</TD>
194 <CODE>static int</CODE></FONT></TD>
195 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#indexOf(float[], float[])">indexOf</A></B>(float[] array,
196 float[] target)</CODE>
199 Returns the start position of the first occurrence of the specified <code>target</code> within <code>array</code>, or <code>-1</code> if there is no such occurrence.</TD>
203 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#join(java.lang.String, float...)">join</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> separator,
205 float... array)</CODE>
208 Returns a string containing the supplied <code>float</code> values, converted
209 to strings as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#toString(float)" title="class or interface in java.lang"><CODE>Float.toString(float)</CODE></A>, and separated by
210 <code>separator</code>.</TD>
214 <CODE>static int</CODE></FONT></TD>
215 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#lastIndexOf(float[], float)">lastIndexOf</A></B>(float[] array,
216 float target)</CODE>
219 Returns the index of the last appearance of the value <code>target</code> in
220 <code>array</code>.</TD>
224 <CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util">Comparator</A><float[]></CODE></FONT></TD>
225 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#lexicographicalComparator()">lexicographicalComparator</A></B>()</CODE>
228 Returns a comparator that compares two <code>float</code> arrays
233 <CODE>static float</CODE></FONT></TD>
234 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#max(float...)">max</A></B>(float... array)</CODE>
237 Returns the greatest value present in <code>array</code>, using the same rules
238 of comparison as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Math.html?is-external=true#min(float, float)" title="class or interface in java.lang"><CODE>Math.min(float, float)</CODE></A>.</TD>
242 <CODE>static float</CODE></FONT></TD>
243 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#min(float...)">min</A></B>(float... array)</CODE>
246 Returns the least value present in <code>array</code>, using the same rules of
247 comparison as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Math.html?is-external=true#min(float, float)" title="class or interface in java.lang"><CODE>Math.min(float, float)</CODE></A>.</TD>
251 <CODE>static float[]</CODE></FONT></TD>
252 <TD><CODE><B><A HREF="../../../../com/google/common/primitives/Floats.html#toArray(java.util.Collection)">toArray</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</A>> collection)</CODE>
255 Copies a collection of <code>Float</code> instances into a new array of
256 primitive <code>float</code> values.</TD>
265 <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>
286 <DD>Returns a hash code for <code>value</code>; equal to the result of invoking
287 <code>((Float) value).hashCode()</code>.
290 <DT><B>Parameters:</B><DD><CODE>value</CODE> - a primitive <code>float</code> value
291 <DT><B>Returns:</B><DD>a hash code for the value</DL>
302 <DD>Compares the two specified <code>float</code> values using <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#compare(float, float)" title="class or interface in java.lang"><CODE>Float.compare(float, float)</CODE></A>. You may prefer to invoke that method
307 <DT><B>Parameters:</B><DD><CODE>a</CODE> - the first <code>float</code> to compare<DD><CODE>b</CODE> - the second <code>float</code> to compare
308 <DT><B>Returns:</B><DD>the result of invoking <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#compare(float, float)" title="class or interface in java.lang"><CODE>Float.compare(float, float)</CODE></A></DL>
319 <DD>Returns <code>true</code> if <code>target</code> is present as an element anywhere in
320 <code>array</code>. Note that this always returns <code>false</code> when <code>target</code> is <code>NaN</code>.
323 <DT><B>Parameters:</B><DD><CODE>array</CODE> - an array of <code>float</code> values, possibly empty<DD><CODE>target</CODE> - a primitive <code>float</code> value
324 <DT><B>Returns:</B><DD><code>true</code> if <code>array[i] == target</code> for some value of <code>i</code></DL>
335 <DD>Returns the index of the first appearance of the value <code>target</code> in
336 <code>array</code>. Note that this always returns <code>-1</code> when <code>target</code>
337 is <code>NaN</code>.
340 <DT><B>Parameters:</B><DD><CODE>array</CODE> - an array of <code>float</code> values, possibly empty<DD><CODE>target</CODE> - a primitive <code>float</code> value
341 <DT><B>Returns:</B><DD>the least index <code>i</code> for which <code>array[i] == target</code>, or
342 <code>-1</code> if no such index exists.</DL>
353 <DD>Returns the start position of the first occurrence of the specified <code>target</code> within <code>array</code>, or <code>-1</code> if there is no such occurrence.
355 <p>More formally, returns the lowest index <code>i</code> such that <code>java.util.Arrays.copyOfRange(array, i, i + target.length)</code> contains exactly
356 the same elements as <code>target</code>.
358 <p>Note that this always returns <code>-1</code> when <code>target</code> contains
359 <code>NaN</code>.
362 <DT><B>Parameters:</B><DD><CODE>array</CODE> - the array to search for the sequence <code>target</code><DD><CODE>target</CODE> - the array to search for as a sub-sequence of <code>array</code></DL>
373 <DD>Returns the index of the last appearance of the value <code>target</code> in
374 <code>array</code>. Note that this always returns <code>-1</code> when <code>target</code>
375 is <code>NaN</code>.
378 <DT><B>Parameters:</B><DD><CODE>array</CODE> - an array of <code>float</code> values, possibly empty<DD><CODE>target</CODE> - a primitive <code>float</code> value
379 <DT><B>Returns:</B><DD>the greatest index <code>i</code> for which <code>array[i] == target</code>,
380 or <code>-1</code> if no such index exists.</DL>
390 <DD>Returns the least value present in <code>array</code>, using the same rules of
391 comparison as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Math.html?is-external=true#min(float, float)" title="class or interface in java.lang"><CODE>Math.min(float, float)</CODE></A>.
394 <DT><B>Parameters:</B><DD><CODE>array</CODE> - a <i>nonempty</i> array of <code>float</code> values
395 <DT><B>Returns:</B><DD>the value present in <code>array</code> that is less than or equal to
398 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>array</code> is empty</DL>
408 <DD>Returns the greatest value present in <code>array</code>, using the same rules
409 of comparison as <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Math.html?is-external=true#min(float, float)" title="class or interface in java.lang"><CODE>Math.min(float, float)</CODE></A>.
412 <DT><B>Parameters:</B><DD><CODE>array</CODE> - a <i>nonempty</i> array of <code>float</code> values
413 <DT><B>Returns:</B><DD>the value present in <code>array</code> that is greater than or equal to
416 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>array</code> is empty</DL>
427 For example, <code>concat(new float[] {a, b}, new float[] {}, new
428 float[] {c}</code> returns the array <code>{a, b, c}</code>.
431 <DT><B>Parameters:</B><DD><CODE>arrays</CODE> - zero or more <code>float</code> arrays
445 <DD>Returns an array containing the same values as <code>array</code>, but
446 guaranteed to be of a specified minimum length. If <code>array</code> already
447 has a length of at least <code>minLength</code>, it is returned directly.
448 Otherwise, a new array of size <code>minLength + padding</code> is returned,
449 containing the values of <code>array</code>, and zeroes in the remaining places.
452 <DT><B>Parameters:</B><DD><CODE>array</CODE> - the source array<DD><CODE>minLength</CODE> - the minimum length the returned array must guarantee<DD><CODE>padding</CODE> - an extra amount to "grow" the array by if growth is
454 <DT><B>Returns:</B><DD>an array containing the values of <code>array</code>, with guaranteed
455 minimum length <code>minLength</code>
457 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>minLength</code> or <code>padding</code> is
469 <DD>Returns a string containing the supplied <code>float</code> values, converted
470 to strings as specified by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Float.html?is-external=true#toString(float)" title="class or interface in java.lang"><CODE>Float.toString(float)</CODE></A>, and separated by
471 <code>separator</code>. For example, <code>join("-", 1.0f, 2.0f, 3.0f)</code>
472 returns the string <code>"1.0-2.0-3.0"</code>.
475 <DT><B>Parameters:</B><DD><CODE>separator</CODE> - the text that should appear between consecutive values in
476 the resulting string (but not at the start or end)<DD><CODE>array</CODE> - an array of <code>float</code> values, possibly empty</DL>
486 <DD>Returns a comparator that compares two <code>float</code> arrays
487 lexicographically. That is, it compares, using <A HREF="../../../../com/google/common/primitives/Floats.html#compare(float, float)"><CODE>compare(float, float)</CODE></A>), the first pair of values that follow any
489 shorter array as the lesser. For example, <code>[] < [1.0f] < [1.0f, 2.0f]
490 < [2.0f]</code>.
492 <p>The returned comparator is inconsistent with <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"><CODE>Object.equals(Object)</CODE></A> (since arrays support only identity equality), but
493 it is consistent with <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html?is-external=true#equals(float[], float[])" title="class or interface in java.util"><CODE>Arrays.equals(float[], float[])</CODE></A>.
509 <DD>Copies a collection of <code>Float</code> instances into a new array of
510 primitive <code>float</code> values.
512 <p>Elements are copied from the argument collection as if by <code>collection.toArray()</code>. Calling this method is as thread-safe as calling
516 <DT><B>Parameters:</B><DD><CODE>collection</CODE> - a collection of <code>Float</code> objects
517 <DT><B>Returns:</B><DD>an array containing the same values as <code>collection</code>, in the
520 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if <code>collection</code> or any of its elements
531 <DD>Returns a fixed-size list backed by the specified array, similar to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html?is-external=true#asList(T...)" title="class or interface in java.util"><CODE>Arrays.asList(Object[])</CODE></A>. The list supports <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true#set(int, E)" title="class or interface in java.util"><CODE>List.set(int, Object)</CODE></A>,
532 but any attempt to set a value to <code>null</code> will result in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><CODE>NullPointerException</CODE></A>.
535 <code>Float</code> objects written to or read from it. For example, whether
536 <code>list.get(0) == list.get(0)</code> is true for the returned list is
539 <p>The returned list may have unexpected behavior if it contains <code>NaN</code>, or if <code>NaN</code> is used as a parameter to any of its methods.
542 <DT><B>Parameters:</B><DD><CODE>backingArray</CODE> - the array to back the list