Java Doc for IntArrayList.java in  » Database-ORM » TJDO » com » triactive » jdo » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » TJDO » com.triactive.jdo.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.triactive.jdo.util.IntArrayList

IntArrayList
public class IntArrayList implements Cloneable(Code)
A variation on the standard ArrayList class that efficiently handles arrays of integers. Using this class rather than ArrayList avoids the need to "box" each element in an instance of java.lang.Integer. It is useful where performance is important.
author:
   Mike Martin
version:
   $Revision: 1.1 $



Constructor Summary
public  IntArrayList()
     Constructs an empty list with an initial capacity of ten.
public  IntArrayList(int initialCapacity)
     Constructs an empty list with the specified initial capacity.
public  IntArrayList(int[] initialContents)
     Constructs a list containing the elements of the specified array.

Method Summary
public  voidadd(int element)
     Appends the specified element to the end of this list.
public  voidadd(int index, int element)
     Inserts the specified element at the specified position in this list.
public  voidaddAll(int[] ai)
     Appends all of the elements in the specified array to the end of this list.
public  voidaddAll(int index, int[] ai)
     Inserts all of the elements in the specified array into this list, starting at the specified position.
public  voidclear()
     Removes all of the elements from this list.
public  Objectclone()
     Returns a copy of this IntArrayList instance.
public  booleancontains(int elem)
     Returns true if this list contains the specified element.
Parameters:
  elem - element whose presence in this List is to be tested.
public  booleancontainsAll(int[] ai)
     Returns true if this list contains all of the elements in the specified list.
public  voidensureCapacity(int minCapacity)
     Increases the capacity of this IntArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
public  booleanequals(Object o)
     Compares the specified object with this list for equality. Returns true if and only if the specified object is also an IntArrayList, both lists have the same size, and all corresponding pairs of elements in the two lists are equal.
Parameters:
  o - the object to be compared for equality with this list.
public  intget(int index)
     Returns the element at the specified position in this list.
public  inthashCode()
     Returns the hash code value for this list.
public  intindexOf(int elem)
     Searches for the first occurence of the given argument.
Parameters:
  elem - An integer to search for.
public  booleanisEmpty()
     Tests if this list has no elements.
public  intlastIndexOf(int elem)
     Returns the index of the last occurrence of the specified integer in this list.
Parameters:
  elem - The desired element.
public  intremove(int index)
     Removes the element at the specified position in this list.
public  booleanremoveAll(int[] ai)
     Removes from this list all of its elements that are contained in the specified array.
public  booleanretainAll(int[] ai)
     Retains only the elements in this list that are contained in the specified array.
public  intset(int index, int element)
     Replaces the element at the specified position in this list with the specified element.
public  intsize()
     Returns the number of elements in this list.
public  int[]toArray()
     Returns an array containing all of the elements in this list.
public  StringtoString()
     Returns a string representation of this list.
public  voidtrimToSize()
     Trims the capacity of this IntArrayList instance to be the list's current size.


Constructor Detail
IntArrayList
public IntArrayList()(Code)
Constructs an empty list with an initial capacity of ten.



IntArrayList
public IntArrayList(int initialCapacity)(Code)
Constructs an empty list with the specified initial capacity.
Parameters:
  initialCapacity - The initial capacity of the list.
exception:
  IllegalArgumentException - If the specified initial capacity is negative.



IntArrayList
public IntArrayList(int[] initialContents)(Code)
Constructs a list containing the elements of the specified array. The IntArrayList instance has an initial capacity of 110% the size of the specified collection.
Parameters:
  initialContents - The array whose elements are to be placed into this list.




Method Detail
add
public void add(int element)(Code)
Appends the specified element to the end of this list.
Parameters:
  element - Element to be appended to this list.



add
public void add(int index, int element)(Code)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
Parameters:
  index - Index at which the specified element is to be inserted.
Parameters:
  element - Element to be inserted.
exception:
  IndexOutOfBoundsException - If index is out of range (index < 0 || index > size()).



addAll
public void addAll(int[] ai)(Code)
Appends all of the elements in the specified array to the end of this list.
Parameters:
  ai - The elements to be added to this list.



addAll
public void addAll(int index, int[] ai)(Code)
Inserts all of the elements in the specified array into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in the list in the order that they exist in the array argument.
Parameters:
  index - Index at which to insert first element from the specified array.
Parameters:
  ai - Elements to be inserted into this list.
exception:
  IndexOutOfBoundsException - If index is out of range (index < 0 || index > size()).



clear
public void clear()(Code)
Removes all of the elements from this list. The list will be empty after this call returns.



clone
public Object clone()(Code)
Returns a copy of this IntArrayList instance. A clone of this ArrayList instance.



contains
public boolean contains(int elem)(Code)
Returns true if this list contains the specified element.
Parameters:
  elem - element whose presence in this List is to be tested. true if the specified element is present;false otherwise.



containsAll
public boolean containsAll(int[] ai)(Code)
Returns true if this list contains all of the elements in the specified list.

This implementation iterates over the specified array, checking each element in turn to see if it's contained in this list. If all elements are so contained true is returned, otherwise false.
Parameters:
  ai - Array to be checked for containment in this list.true if this list contains all of the elements in thespecified array.
See Also:   IntArrayList.contains




ensureCapacity
public void ensureCapacity(int minCapacity)(Code)
Increases the capacity of this IntArrayList instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
Parameters:
  minCapacity - The desired minimum capacity.



equals
public boolean equals(Object o)(Code)
Compares the specified object with this list for equality. Returns true if and only if the specified object is also an IntArrayList, both lists have the same size, and all corresponding pairs of elements in the two lists are equal.
Parameters:
  o - the object to be compared for equality with this list. true if the specified object is equal to this list.



get
public int get(int index)(Code)
Returns the element at the specified position in this list.
Parameters:
  index - Index of element to return.The element at the specified position in this list.
exception:
  IndexOutOfBoundsException - If index is out of range (index < 0 || index >= size()).



hashCode
public int hashCode()(Code)
Returns the hash code value for this list. The hash code value for this list.



indexOf
public int indexOf(int elem)(Code)
Searches for the first occurence of the given argument.
Parameters:
  elem - An integer to search for. The index of the first occurrence of the argument in thislist; returns -1 if the value is not found.



isEmpty
public boolean isEmpty()(Code)
Tests if this list has no elements. true if this list has no elements;false otherwise.



lastIndexOf
public int lastIndexOf(int elem)(Code)
Returns the index of the last occurrence of the specified integer in this list.
Parameters:
  elem - The desired element. The index of the last occurrence of the specified integer inthis list; returns -1 if the value is not found.



remove
public int remove(int index)(Code)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
Parameters:
  index - The index of the element to removed.The element that was removed from the list.
exception:
  IndexOutOfBoundsException - If index is out of range (index < 0 || index >= size()).



removeAll
public boolean removeAll(int[] ai)(Code)
Removes from this list all of its elements that are contained in the specified array.

This implementation iterates over this list, checking each element in turn to see if it's contained in the specified array. If it's so contained, it's removed from this list.
Parameters:
  ai - Elements to be removed from this list.true if this list changed as a result of the call.
See Also:   IntArrayList.remove
See Also:   IntArrayList.contains




retainAll
public boolean retainAll(int[] ai)(Code)
Retains only the elements in this list that are contained in the specified array. In other words, removes from this list all of its elements that are not contained in the specified array.

This implementation iterates over this list, checking each element in turn to see if it's contained in the specified array. If it's not so contained, it's removed from this list.
Parameters:
  ai - Elements to be retained in this list.true if this list changed as a result of the call.
See Also:   IntArrayList.remove
See Also:   IntArrayList.contains




set
public int set(int index, int element)(Code)
Replaces the element at the specified position in this list with the specified element.
Parameters:
  index - Index of element to replace.
Parameters:
  element - Element to be stored at the specified position.The element previously at the specified position.
exception:
  IndexOutOfBoundsException - If index is out of range (index < 0 || index >= size()).



size
public int size()(Code)
Returns the number of elements in this list. The number of elements in this list.



toArray
public int[] toArray()(Code)
Returns an array containing all of the elements in this list. An array containing all of the elements in this list.



toString
public String toString()(Code)
Returns a string representation of this list. The string representation consists of a list of the elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String.valueOf(int). A string representation of this collection.



trimToSize
public void trimToSize()(Code)
Trims the capacity of this IntArrayList instance to be the list's current size. An application can use this operation to minimize the storage of an IntArrayList instance.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.