<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:08 CET 2013 -->
<TITLE>
FloatArray (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2013-01-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="FloatArray (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FloatArray.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/utils/GdxBuild.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/utils/FloatArray.html" target="_top"><B>FRAMES
</B></A>
<A HREF="FloatArray.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.utils
</FONT>
<BR>
Class FloatArray
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.utils.FloatArray
</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class
<B>FloatArray
</B><DT>extends java.lang.Object
</DL>
</PRE>
<P>
A resizable, ordered or unordered float array. Avoids the boxing that occurs with ArrayList
<Float>. If unordered, this class
avoids a memory copy when removing elements (the last element is moved to the removed element's position).
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>Nathan Sweet
</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#items">items
</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#ordered">ordered
</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#size">size
</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray()">FloatArray
</A></B>()
</CODE>
<BR>
Creates an ordered array with a capacity of 16.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray(boolean, float[])">FloatArray
</A></B>(boolean
ordered,
float[]
array)
</CODE>
<BR>
Creates a new array containing the elements in the specified array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray(boolean, int)">FloatArray
</A></B>(boolean
ordered,
int
capacity)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray(float[])">FloatArray
</A></B>(float[]
array)
</CODE>
<BR>
Creates a new ordered array containing the elements in the specified array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray(com.badlogic.gdx.utils.FloatArray)">FloatArray
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</CODE>
<BR>
Creates a new array containing the elements in the specific array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#FloatArray(int)">FloatArray
</A></B>(int
capacity)
</CODE>
<BR>
Creates an ordered array with the specified capacity.
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#add(float)">add
</A></B>(float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#addAll(float[])">addAll
</A></B>(float[]
array)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#addAll(float[], int, int)">addAll
</A></B>(float[]
array,
int
offset,
int
length)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#addAll(com.badlogic.gdx.utils.FloatArray)">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#addAll(com.badlogic.gdx.utils.FloatArray, int, int)">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array,
int
offset,
int
length)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#clear()">clear
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#contains(float)">contains
</A></B>(float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#ensureCapacity(int)">ensureCapacity
</A></B>(int
additionalCapacity)
</CODE>
<BR>
Increases the size of the backing array to acommodate the specified number of additional items.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#equals(java.lang.Object)">equals
</A></B>(java.lang.Object
object)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#first()">first
</A></B>()
</CODE>
<BR>
Returns the first item.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#get(int)">get
</A></B>(int
index)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#indexOf(float)">indexOf
</A></B>(float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#insert(int, float)">insert
</A></B>(int
index,
float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#lastIndexOf(char)">lastIndexOf
</A></B>(char
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#peek()">peek
</A></B>()
</CODE>
<BR>
Returns the last item.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#pop()">pop
</A></B>()
</CODE>
<BR>
Removes and returns the last item.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#random()">random
</A></B>()
</CODE>
<BR>
Returns a random item from the array, or zero if the array is empty.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#removeAll(com.badlogic.gdx.utils.FloatArray)">removeAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</CODE>
<BR>
Removes from this array all of elements contained in the specified array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#removeIndex(int)">removeIndex
</A></B>(int
index)
</CODE>
<BR>
Removes and returns the item at the specified index.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#removeValue(float)">removeValue
</A></B>(float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected
float[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#resize(int)">resize
</A></B>(int
newSize)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#reverse()">reverse
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#set(int, float)">set
</A></B>(int
index,
float
value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#shrink()">shrink
</A></B>()
</CODE>
<BR>
Reduces the size of the backing array to the size of the actual items.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#shuffle()">shuffle
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#sort()">sort
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#swap(int, int)">swap
</A></B>(int
first,
int
second)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> float[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#toArray()">toArray
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#toString()">toString
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#toString(java.lang.String)">toString
</A></B>(java.lang.String
separator)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#truncate(int)">truncate
</A></B>(int
newSize)
</CODE>
<BR>
Reduces the size of the array to the specified size.
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="items"><!-- --></A><H3>
items
</H3>
<PRE>
public float[]
<B>items
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="size"><!-- --></A><H3>
size
</H3>
<PRE>
public int
<B>size
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="ordered"><!-- --></A><H3>
ordered
</H3>
<PRE>
public boolean
<B>ordered
</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="FloatArray()"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>()
</PRE>
<DL>
<DD>Creates an ordered array with a capacity of 16.
<P>
</DL>
<HR>
<A NAME="FloatArray(int)"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>(int
capacity)
</PRE>
<DL>
<DD>Creates an ordered array with the specified capacity.
<P>
</DL>
<HR>
<A NAME="FloatArray(boolean, int)"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>(boolean
ordered,
int
capacity)
</PRE>
<DL>
<DL>
<DT><B>Parameters:
</B><DD><CODE>ordered
</CODE> - If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy.
<DD><CODE>capacity
</CODE> - Any elements added beyond this will cause the backing array to be grown.
</DL>
</DL>
<HR>
<A NAME="FloatArray(com.badlogic.gdx.utils.FloatArray)"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</PRE>
<DL>
<DD>Creates a new array containing the elements in the specific array. The new array will be ordered if the specific array is
ordered. The capacity is set to the number of elements, so any subsequent elements added will cause the backing array to be
grown.
<P>
</DL>
<HR>
<A NAME="FloatArray(float[])"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>(float[]
array)
</PRE>
<DL>
<DD>Creates a new ordered array containing the elements in the specified array. The capacity is set to the number of elements,
so any subsequent elements added will cause the backing array to be grown.
<P>
</DL>
<HR>
<A NAME="FloatArray(boolean, float[])"><!-- --></A><H3>
FloatArray
</H3>
<PRE>
public
<B>FloatArray
</B>(boolean
ordered,
float[]
array)
</PRE>
<DL>
<DD>Creates a new array containing the elements in the specified array. The capacity is set to the number of elements, so any
subsequent elements added will cause the backing array to be grown.
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>ordered
</CODE> - If false, methods that remove elements may change the order of other elements in the array, which avoids a
memory copy.
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="add(float)"><!-- --></A><H3>
add
</H3>
<PRE>
public void
<B>add
</B>(float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(com.badlogic.gdx.utils.FloatArray)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(com.badlogic.gdx.utils.FloatArray, int, int)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array,
int
offset,
int
length)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(float[])"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(float[]
array)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(float[], int, int)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(float[]
array,
int
offset,
int
length)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="get(int)"><!-- --></A><H3>
get
</H3>
<PRE>
public float
<B>get
</B>(int
index)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="set(int, float)"><!-- --></A><H3>
set
</H3>
<PRE>
public void
<B>set
</B>(int
index,
float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="insert(int, float)"><!-- --></A><H3>
insert
</H3>
<PRE>
public void
<B>insert
</B>(int
index,
float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="swap(int, int)"><!-- --></A><H3>
swap
</H3>
<PRE>
public void
<B>swap
</B>(int
first,
int
second)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="contains(float)"><!-- --></A><H3>
contains
</H3>
<PRE>
public boolean
<B>contains
</B>(float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(float)"><!-- --></A><H3>
indexOf
</H3>
<PRE>
public int
<B>indexOf
</B>(float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOf(char)"><!-- --></A><H3>
lastIndexOf
</H3>
<PRE>
public int
<B>lastIndexOf
</B>(char
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeValue(float)"><!-- --></A><H3>
removeValue
</H3>
<PRE>
public boolean
<B>removeValue
</B>(float
value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeIndex(int)"><!-- --></A><H3>
removeIndex
</H3>
<PRE>
public float
<B>removeIndex
</B>(int
index)
</PRE>
<DL>
<DD>Removes and returns the item at the specified index.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeAll(com.badlogic.gdx.utils.FloatArray)"><!-- --></A><H3>
removeAll
</H3>
<PRE>
public boolean
<B>removeAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html" title="class in com.badlogic.gdx.utils">FloatArray
</A> array)
</PRE>
<DL>
<DD>Removes from this array all of elements contained in the specified array.
<P>
<DD><DL>
<DT><B>Returns:
</B><DD>true if this array was modified.
</DL>
</DD>
</DL>
<HR>
<A NAME="pop()"><!-- --></A><H3>
pop
</H3>
<PRE>
public float
<B>pop
</B>()
</PRE>
<DL>
<DD>Removes and returns the last item.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="peek()"><!-- --></A><H3>
peek
</H3>
<PRE>
public float
<B>peek
</B>()
</PRE>
<DL>
<DD>Returns the last item.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="first()"><!-- --></A><H3>
first
</H3>
<PRE>
public float
<B>first
</B>()
</PRE>
<DL>
<DD>Returns the first item.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="clear()"><!-- --></A><H3>
clear
</H3>
<PRE>
public void
<B>clear
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="shrink()"><!-- --></A><H3>
shrink
</H3>
<PRE>
public void
<B>shrink
</B>()
</PRE>
<DL>
<DD>Reduces the size of the backing array to the size of the actual items. This is useful to release memory when many items have
been removed, or if it is known that more items will not be added.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ensureCapacity(int)"><!-- --></A><H3>
ensureCapacity
</H3>
<PRE>
public float[]
<B>ensureCapacity
</B>(int
additionalCapacity)
</PRE>
<DL>
<DD>Increases the size of the backing array to acommodate the specified number of additional items. Useful before adding many
items to avoid multiple backing array resizes.
<P>
<DD><DL>
<DT><B>Returns:
</B><DD><A HREF="../../../../com/badlogic/gdx/utils/FloatArray.html#items"><CODE>items
</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="resize(int)"><!-- --></A><H3>
resize
</H3>
<PRE>
protected float[]
<B>resize
</B>(int
newSize)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="sort()"><!-- --></A><H3>
sort
</H3>
<PRE>
public void
<B>sort
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="reverse()"><!-- --></A><H3>
reverse
</H3>
<PRE>
public void
<B>reverse
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="shuffle()"><!-- --></A><H3>
shuffle
</H3>
<PRE>
public void
<B>shuffle
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="truncate(int)"><!-- --></A><H3>
truncate
</H3>
<PRE>
public void
<B>truncate
</B>(int
newSize)
</PRE>
<DL>
<DD>Reduces the size of the array to the specified size. If the array is already smaller than the specified size, no action is
taken.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="random()"><!-- --></A><H3>
random
</H3>
<PRE>
public float
<B>random
</B>()
</PRE>
<DL>
<DD>Returns a random item from the array, or zero if the array is empty.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toArray()"><!-- --></A><H3>
toArray
</H3>
<PRE>
public float[]
<B>toArray
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals
</H3>
<PRE>
public boolean
<B>equals
</B>(java.lang.Object
object)
</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:
</B><DD><CODE>equals
</CODE> in class
<CODE>java.lang.Object
</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString
</H3>
<PRE>
public java.lang.String
<B>toString
</B>()
</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:
</B><DD><CODE>toString
</CODE> in class
<CODE>java.lang.Object
</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString(java.lang.String)"><!-- --></A><H3>
toString
</H3>
<PRE>
public java.lang.String
<B>toString
</B>(java.lang.String
separator)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FloatArray.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/utils/GdxBuild.html" title="class in com.badlogic.gdx.utils"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/utils/FloatArray.html" target="_top"><B>FRAMES
</B></A>
<A HREF="FloatArray.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
NESTED
|
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>