<!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:07 CET 2013 -->
<TITLE>
Array (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="Array (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/Array.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">
PREV CLASS
<A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterable.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/Array.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Array.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:
<A HREF="#nested_class_summary">NESTED
</A> |
<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 Array
<T
></H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.utils.Array
<T
></B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:
</B> <DD>java.lang.Iterable
<T
></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:
</B> <DD><A HREF="../../../../com/badlogic/gdx/utils/DelayedRemovalArray.html" title="class in com.badlogic.gdx.utils">DelayedRemovalArray
</A>,
<A HREF="../../../../com/badlogic/gdx/utils/SnapshotArray.html" title="class in com.badlogic.gdx.utils">SnapshotArray
</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class
<B>Array
<T
></B><DT>extends java.lang.Object
<DT>implements java.lang.Iterable
<T
></DL>
</PRE>
<P>
A resizable, ordered or unordered array of objects. 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>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_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>Nested Class Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
class
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterable.html" title="class in com.badlogic.gdx.utils">Array.ArrayIterable
</A><<A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterable.html" title="type parameter in Array.ArrayIterable">T
</A>></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
class
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterator.html" title="class in com.badlogic.gdx.utils">Array.ArrayIterator
</A><<A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterator.html" title="type parameter in Array.ArrayIterator">T
</A>></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- =========== 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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#items">items
</A></B></CODE>
<BR>
Provides direct access to the underlying array.
</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/Array.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/Array.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/Array.html#Array()">Array
</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/Array.html#Array(com.badlogic.gdx.utils.Array)">Array
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A> 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/Array.html#Array(boolean, int)">Array
</A></B>(boolean
ordered,
int
capacity)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#Array(boolean, int, java.lang.Class)">Array
</A></B>(boolean
ordered,
int
capacity,
java.lang.Class
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> arrayType)
</CODE>
<BR>
Creates a new array with
<A HREF="../../../../com/badlogic/gdx/utils/Array.html#items"><CODE>items
</CODE></A> of the specified type.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#Array(boolean, T[])">Array
</A></B>(boolean
ordered,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
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/Array.html#Array(java.lang.Class)">Array
</A></B>(java.lang.Class
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> arrayType)
</CODE>
<BR>
Creates an ordered array with
<A HREF="../../../../com/badlogic/gdx/utils/Array.html#items"><CODE>items
</CODE></A> of the specified type and a capacity of 16.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#Array(int)">Array
</A></B>(int
capacity)
</CODE>
<BR>
Creates an ordered array with the specified capacity.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#Array(T[])">Array
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
array)
</CODE>
<BR>
Creates a new ordered array containing the elements in the specified array.
</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/Array.html#add(T)">add
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> 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/Array.html#addAll(com.badlogic.gdx.utils.Array)">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</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/Array.html#addAll(com.badlogic.gdx.utils.Array, int, int)">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</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/Array.html#addAll(T[])">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</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/Array.html#addAll(T[], int, int)">addAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</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/Array.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/Array.html#contains(T, boolean)">contains
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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/Array.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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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/Array.html#indexOf(T, boolean)">indexOf
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</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/Array.html#insert(int, T)">insert
</A></B>(int
index,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Iterator
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#iterator()">iterator
</A></B>()
</CODE>
<BR>
Returns an iterator for the items in the array.
</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/Array.html#lastIndexOf(T, boolean)">lastIndexOf
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#random()">random
</A></B>()
</CODE>
<BR>
Returns a random item from the array, or null 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/Array.html#removeAll(com.badlogic.gdx.utils.Array, boolean)">removeAll
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A><<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> array,
boolean
identity)
</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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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/Array.html#removeValue(T, boolean)">removeValue
</A></B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#resize(int)">resize
</A></B>(int
newSize)
</CODE>
<BR>
Creates a new backing array with the specified size containing the current 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/Array.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/Array.html#set(int, T)">set
</A></B>(int
index,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> 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/Array.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/Array.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/Array.html#sort()">sort
</A></B>()
</CODE>
<BR>
Sorts this array.
</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/Array.html#sort(java.util.Comparator)">sort
</A></B>(java.util.Comparator
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> comparator)
</CODE>
<BR>
Sorts the array.
</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/Array.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> <A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.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>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><V
> V[]
</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/utils/Array.html#toArray(java.lang.Class)">toArray
</A></B>(java.lang.Class
<V
> type)
</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/Array.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/Array.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/Array.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
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
<B>items
</B></PRE>
<DL>
<DD>Provides direct access to the underlying array. If the Array's generic type is not Object, this field may only be accessed
if the
<A HREF="../../../../com/badlogic/gdx/utils/Array.html#Array(boolean, int, java.lang.Class)"><CODE>Array(boolean, int, Class)
</CODE></A> constructor was used.
<P>
<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="Array()"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>()
</PRE>
<DL>
<DD>Creates an ordered array with a capacity of 16.
<P>
</DL>
<HR>
<A NAME="Array(int)"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(int
capacity)
</PRE>
<DL>
<DD>Creates an ordered array with the specified capacity.
<P>
</DL>
<HR>
<A NAME="Array(boolean, int)"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</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="Array(boolean, int, java.lang.Class)"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(boolean
ordered,
int
capacity,
java.lang.Class
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> arrayType)
</PRE>
<DL>
<DD>Creates a new array with
<A HREF="../../../../com/badlogic/gdx/utils/Array.html#items"><CODE>items
</CODE></A> of the specified type.
<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.
<DD><CODE>capacity
</CODE> - Any elements added beyond this will cause the backing array to be grown.
</DL>
</DL>
<HR>
<A NAME="Array(java.lang.Class)"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(java.lang.Class
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> arrayType)
</PRE>
<DL>
<DD>Creates an ordered array with
<A HREF="../../../../com/badlogic/gdx/utils/Array.html#items"><CODE>items
</CODE></A> of the specified type and a capacity of 16.
<P>
</DL>
<HR>
<A NAME="Array(com.badlogic.gdx.utils.Array)"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A> array)
</PRE>
<DL>
<DD>Creates a new array containing the elements in the specified array. The new array will have the same type of backing array
and will be ordered if the specified 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="Array(java.lang.Object[])"><!-- --></A><A NAME="Array(T[])"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
array)
</PRE>
<DL>
<DD>Creates a new ordered array containing the elements in the specified array. The new array will have the same type of backing
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="Array(boolean,java.lang.Object[])"><!-- --></A><A NAME="Array(boolean, T[])"><!-- --></A><H3>
Array
</H3>
<PRE>
public
<B>Array
</B>(boolean
ordered,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
array)
</PRE>
<DL>
<DD>Creates a new array containing the elements in the specified array. The new array will have the same type of backing 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(java.lang.Object)"><!-- --></A><A NAME="add(T)"><!-- --></A><H3>
add
</H3>
<PRE>
public void
<B>add
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(com.badlogic.gdx.utils.Array)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A> array)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(com.badlogic.gdx.utils.Array, int, int)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A> array,
int
offset,
int
length)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(java.lang.Object[])"><!-- --></A><A NAME="addAll(T[])"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
array)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(java.lang.Object[],int,int)"><!-- --></A><A NAME="addAll(T[], int, int)"><!-- --></A><H3>
addAll
</H3>
<PRE>
public void
<B>addAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
array,
int
offset,
int
length)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="get(int)"><!-- --></A><H3>
get
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>get
</B>(int
index)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="set(int,java.lang.Object)"><!-- --></A><A NAME="set(int, T)"><!-- --></A><H3>
set
</H3>
<PRE>
public void
<B>set
</B>(int
index,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="insert(int,java.lang.Object)"><!-- --></A><A NAME="insert(int, T)"><!-- --></A><H3>
insert
</H3>
<PRE>
public void
<B>insert
</B>(int
index,
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<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>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="contains(java.lang.Object,boolean)"><!-- --></A><A NAME="contains(T, boolean)"><!-- --></A><H3>
contains
</H3>
<PRE>
public boolean
<B>contains
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>identity
</CODE> - If true, == comparison will be used. If false, .equals() comaparison will be used.
</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(java.lang.Object,boolean)"><!-- --></A><A NAME="indexOf(T, boolean)"><!-- --></A><H3>
indexOf
</H3>
<PRE>
public int
<B>indexOf
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOf(java.lang.Object,boolean)"><!-- --></A><A NAME="lastIndexOf(T, boolean)"><!-- --></A><H3>
lastIndexOf
</H3>
<PRE>
public int
<B>lastIndexOf
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeValue(java.lang.Object,boolean)"><!-- --></A><A NAME="removeValue(T, boolean)"><!-- --></A><H3>
removeValue
</H3>
<PRE>
public boolean
<B>removeValue
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> value,
boolean
identity)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeIndex(int)"><!-- --></A><H3>
removeIndex
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>removeIndex
</B>(int
index)
</PRE>
<DL>
<DD>Removes and returns the item at the specified index.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeAll(com.badlogic.gdx.utils.Array, boolean)"><!-- --></A><H3>
removeAll
</H3>
<PRE>
public boolean
<B>removeAll
</B>(
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="class in com.badlogic.gdx.utils">Array
</A><<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> array,
boolean
identity)
</PRE>
<DL>
<DD>Removes from this array all of elements contained in the specified array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>identity
</CODE> - True to use ==, false to use .equals().
<DT><B>Returns:
</B><DD>true if this array was modified.
</DL>
</DD>
</DL>
<HR>
<A NAME="pop()"><!-- --></A><H3>
pop
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>pop
</B>()
</PRE>
<DL>
<DD>Removes and returns the last item.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="peek()"><!-- --></A><H3>
peek
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>peek
</B>()
</PRE>
<DL>
<DD>Returns the last item.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="first()"><!-- --></A><H3>
first
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>first
</B>()
</PRE>
<DL>
<DD>Returns the first item.
<P>
<DD><DL>
</DL>
</DD>
<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>
<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>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ensureCapacity(int)"><!-- --></A><H3>
ensureCapacity
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
<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>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD><A HREF="../../../../com/badlogic/gdx/utils/Array.html#items"><CODE>items
</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="resize(int)"><!-- --></A><H3>
resize
</H3>
<PRE>
protected
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
<B>resize
</B>(int
newSize)
</PRE>
<DL>
<DD>Creates a new backing array with the specified size containing the current items.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="sort()"><!-- --></A><H3>
sort
</H3>
<PRE>
public void
<B>sort
</B>()
</PRE>
<DL>
<DD>Sorts this array. The array elements must implement
<CODE>Comparable
</CODE>. This method is not thread safe (uses
<A HREF="../../../../com/badlogic/gdx/utils/Sort.html#instance()"><CODE>Sort.instance()
</CODE></A>).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="sort(java.util.Comparator)"><!-- --></A><H3>
sort
</H3>
<PRE>
public void
<B>sort
</B>(java.util.Comparator
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> comparator)
</PRE>
<DL>
<DD>Sorts the array. This method is not thread safe (uses
<A HREF="../../../../com/badlogic/gdx/utils/Sort.html#instance()"><CODE>Sort.instance()
</CODE></A>).
<P>
<DD><DL>
</DL>
</DD>
<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>
<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>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="iterator()"><!-- --></A><H3>
iterator
</H3>
<PRE>
public java.util.Iterator
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>> <B>iterator
</B>()
</PRE>
<DL>
<DD>Returns an iterator for the items in the array. Remove is supported. Note that the same iterator instance is returned each
time this method is called. Use the
<A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterator.html" title="class in com.badlogic.gdx.utils"><CODE>Array.ArrayIterator
</CODE></A> constructor for nested or multithreaded iteration.
<P>
<DD><DL>
<DT><B>Specified by:
</B><DD><CODE>iterator
</CODE> in interface
<CODE>java.lang.Iterable
<<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>></CODE></DL>
</DD>
<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>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="random()"><!-- --></A><H3>
random
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A> <B>random
</B>()
</PRE>
<DL>
<DD>Returns a random item from the array, or null if the array is empty.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toArray()"><!-- --></A><H3>
toArray
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/utils/Array.html" title="type parameter in Array">T
</A>[]
<B>toArray
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toArray(java.lang.Class)"><!-- --></A><H3>
toArray
</H3>
<PRE>
public
<V
> V[]
<B>toArray
</B>(java.lang.Class
<V
> type)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<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>
<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/Array.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">
PREV CLASS
<A HREF="../../../../com/badlogic/gdx/utils/Array.ArrayIterable.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/Array.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Array.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:
<A HREF="#nested_class_summary">NESTED
</A> |
<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>