Java Doc for IntList.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » 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 » Collaboration » poi 3.0.2 beta2 » org.apache.poi.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.util.IntList

IntList
public class IntList (Code)
A List of int's; as full an implementation of the java.util.List interface as possible, with an eye toward minimal creation of objects the mimicry of List is as follows:
  • if possible, operations designated 'optional' in the List interface are attempted
  • wherever the List interface refers to an Object, substitute int
  • wherever the List interface refers to a Collection or List, substitute IntList
the mimicry is not perfect, however:
  • operations involving Iterators or ListIterators are not supported
  • remove(Object) becomes removeValue to distinguish it from remove(int index)
  • subList is not supported

author:
   Marc Johnson



Constructor Summary
public  IntList()
    
public  IntList(int initialCapacity)
    
public  IntList(IntList list)
    
public  IntList(int initialCapacity, int fillvalue)
    

Method Summary
public  voidadd(int index, int value)
    
public  booleanadd(int value)
     Appends the specified element to the end of this list
Parameters:
  value - element to be appended to this list.
public  booleanaddAll(IntList c)
     Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.
public  booleanaddAll(int index, IntList c)
     Inserts all of the elements in the specified collection into this list at the specified position.
public  voidclear()
     Removes all of the elements from this list.
public  booleancontains(int o)
     Returns true if this list contains the specified element.
public  booleancontainsAll(IntList c)
     Returns true if this list contains all of the elements of the specified collection.
Parameters:
  c - collection to be checked for containment in this list.
public  booleanequals(Object o)
     Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal.
public  intget(int index)
     Returns the element at the specified position in this list.
Parameters:
  index - index of element to return.
public  inthashCode()
     Returns the hash code value for this list.
public  intindexOf(int o)
     Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
public  booleanisEmpty()
     Returns true if this list contains no elements.
public  intlastIndexOf(int o)
     Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
public  intremove(int index)
     Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).
public  booleanremoveAll(IntList c)
     Removes from this list all the elements that are contained in the specified collection
Parameters:
  c - collection that defines which elements will be removedfrom this list.
public  booleanremoveValue(int o)
     Removes the first occurrence in this list of the specified element (optional operation).
public  booleanretainAll(IntList c)
     Retains only the elements in this list that are contained in the specified collection.
public  intset(int index, int element)
     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.
public  intsize()
     Returns the number of elements in this list.
public  int[]toArray()
     Returns an array containing all of the elements in this list in proper sequence.
public  int[]toArray(int[] a)
     Returns an array containing all of the elements in this list in proper sequence.


Constructor Detail
IntList
public IntList()(Code)
create an IntList of default size



IntList
public IntList(int initialCapacity)(Code)



IntList
public IntList(IntList list)(Code)
create a copy of an existing IntList
Parameters:
  list - the existing IntList



IntList
public IntList(int initialCapacity, int fillvalue)(Code)
create an IntList with a predefined initial size
Parameters:
  initialCapacity - the size for the internal array




Method Detail
add
public void add(int index, int value)(Code)
add the specfied value at the specified index
Parameters:
  index - the index where the new value is to be added
Parameters:
  value - the new value
exception:
  IndexOutOfBoundsException - if the index is out ofrange (index < 0 || index > size()).



add
public boolean add(int value)(Code)
Appends the specified element to the end of this list
Parameters:
  value - element to be appended to this list. true (as per the general contract of the Collection.addmethod).



addAll
public boolean addAll(IntList c)(Code)
Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
Parameters:
  c - collection whose elements are to be added to thislist. true if this list changed as a result of the call.



addAll
public boolean addAll(int index, IntList c)(Code)
Inserts all of the elements in the specified collection into this list 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 this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)
Parameters:
  index - index at which to insert first element from thespecified collection.
Parameters:
  c - elements to be inserted into this list. true if this list changed as a result of the call.
exception:
  IndexOutOfBoundsException - if the index is out ofrange (index < 0 || index > size())



clear
public void clear()(Code)
Removes all of the elements from this list. This list will be empty after this call returns (unless it throws an exception).



contains
public boolean contains(int o)(Code)
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that o == e
Parameters:
  o - element whose presence in this list is to be tested. true if this list contains the specified element.



containsAll
public boolean containsAll(IntList c)(Code)
Returns true if this list contains all of the elements of the specified collection.
Parameters:
  c - collection to be checked for containment in this list. true if this list contains all of the elements of thespecified collection.



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 a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if e1 == e2.) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.
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 the index is out ofrange (index < 0 || index >= size()).



hashCode
public int hashCode()(Code)
Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation: hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) { Object obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); } This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object.hashCode. the hash code value for this list.



indexOf
public int indexOf(int o)(Code)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such that (o == get(i)), or -1 if there is no such index.
Parameters:
  o - element to search for. the index in this list of the first occurrence of thespecified element, or -1 if this list does not containthis element.



isEmpty
public boolean isEmpty()(Code)
Returns true if this list contains no elements. true if this list contains no elements.



lastIndexOf
public int lastIndexOf(int o)(Code)
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the highest index i such that (o == get(i)), or -1 if there is no such index.
Parameters:
  o - element to search for. the index in this list of the last occurrence of thespecified element, or -1 if this list does not containthis element.



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). Returns the element that was removed from the list.
Parameters:
  index - the index of the element to removed. the element previously at the specified position.
exception:
  IndexOutOfBoundsException - if the index is out ofrange (index < 0 || index >= size()).



removeAll
public boolean removeAll(IntList c)(Code)
Removes from this list all the elements that are contained in the specified collection
Parameters:
  c - collection that defines which elements will be removedfrom this list. true if this list changed as a result of the call.



removeValue
public boolean removeValue(int o)(Code)
Removes the first occurrence in this list of the specified element (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that (o.equals(get(i))) (if such an element exists).
Parameters:
  o - element to be removed from this list, if present. true if this list contained the specified element.



retainAll
public boolean retainAll(IntList c)(Code)
Retains only the elements in this list that are contained in the specified collection. In other words, removes from this list all the elements that are not contained in the specified collection.
Parameters:
  c - collection that defines which elements this set willretain. true if this list changed as a result of the call.



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 the index is out ofrange (index < 0 || index >= size()).



size
public int size()(Code)
Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE. the number of elements in this IntList



toArray
public int[] toArray()(Code)
Returns an array containing all of the elements in this list in proper sequence. Obeys the general contract of the Collection.toArray method. an array containing all of the elements in this list inproper sequence.



toArray
public int[] toArray(int[] a)(Code)
Returns an array containing all of the elements in this list in proper sequence. Obeys the general contract of the Collection.toArray(Object[]) method.
Parameters:
  a - the array into which the elements of this list are tobe stored, if it is big enough; otherwise, a new arrayis allocated for this purpose. an array containing the elements of this list.



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.