Java Doc for CollectionsX.java in  » Ajax » zk » org » zkoss » 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 » Ajax » zk » org.zkoss.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.zkoss.util.CollectionsX

CollectionsX
public class CollectionsX (Code)
The collection related utilities.
author:
   tomyeh
See Also:   java.util.Collections

Inner Class :final public static class CollectionEnumeration implements Enumeration
Inner Class :final public static class ArrayEnumeration implements Enumeration
Inner Class :final public static class OneEnumeration implements Enumeration
Inner Class :final public static class ArrayCollection extends AbstractCollection
Inner Class :final public static class ArrayList extends AbstractList
Inner Class :public static class ArrayIterator implements Iterator
Inner Class :public static class ArrayListIterator extends ArrayIterator implements ListIterator
Inner Class :final public static class OneCollection extends AbstractCollection
Inner Class :final public static class OneIterator implements Iterator
Inner Class :final public static class EnumerationIterator implements Iterator

Field Summary
final public static  EnumerationEMPTY_ENUMERATION
     Empty enumeration.
final public static  IteratorEMPTY_ITERATOR
     Empty iterator.


Method Summary
final public static  intaddAll(Collection col, Iterator iter)
     Adds all elements returned by the iterator to a collection.
final public static  intaddAll(Collection col, Enumeration enm)
     Adds all elements returned by the enumerator to a collection.
final public static  intaddAll(Collection col, Object[] ary)
     Adds all elements of an array to a collection.
final public static  booleanisIntersected(Set a, Set b)
     Tests whether two sets has any intersection.
final public static  Iteratoriterator(Object obj)
     Based on the given collection type of Object, return an iterator.
final public static  Collectionparse(Collection c, String src, char separator)
     Parses a string into a list. To quote a string, both '\'' and '"' are OK. Whitespaces are trimmed between quotation and separators.

Unlike Java, quotation could spread over multiple lines.

Example,
a b , ' c d',"'f'", '1' "2", 3
generate a list of "a b", "c d", "'f'", "1", "2" and "3". Note: the separator between "1" and "2" is optional.

Note: Like Java, if the string is ending with a separator, it will be ignored.

Example,
a, , b,
generate a list of "a", "", "b".
Parameters:
  c - the collection to hold the parsed results; a linked listis created if c is null.
Parameters:
  src - the string to parse
Parameters:
  separator - the separator, e.g., ',', '\n' or ' '.Note: if separator is ' ', it denotes any white space.

final public static  Collectionparse(Collection c, String src, char separator, boolean handleBackslash)
     Parses a string into a list.

Field Detail
EMPTY_ENUMERATION
final public static Enumeration EMPTY_ENUMERATION(Code)
Empty enumeration.



EMPTY_ITERATOR
final public static Iterator EMPTY_ITERATOR(Code)
Empty iterator.





Method Detail
addAll
final public static int addAll(Collection col, Iterator iter)(Code)
Adds all elements returned by the iterator to a collection.
Parameters:
  iter - the iterator; null is OK the number element being added



addAll
final public static int addAll(Collection col, Enumeration enm)(Code)
Adds all elements returned by the enumerator to a collection.
Parameters:
  enm - the enumeration; null is OK the number element being added



addAll
final public static int addAll(Collection col, Object[] ary)(Code)
Adds all elements of an array to a collection.
Parameters:
  ary - the array; null is OK the number element being added



isIntersected
final public static boolean isIntersected(Set a, Set b)(Code)
Tests whether two sets has any intersection.



iterator
final public static Iterator iterator(Object obj)(Code)
Based on the given collection type of Object, return an iterator. The Collection type of object can be Collection, Map (return the entry), or Array.



parse
final public static Collection parse(Collection c, String src, char separator)(Code)
Parses a string into a list. To quote a string, both '\'' and '"' are OK. Whitespaces are trimmed between quotation and separators.

Unlike Java, quotation could spread over multiple lines.

Example,
a b , ' c d',"'f'", '1' "2", 3
generate a list of "a b", "c d", "'f'", "1", "2" and "3". Note: the separator between "1" and "2" is optional.

Note: Like Java, if the string is ending with a separator, it will be ignored.

Example,
a, , b,
generate a list of "a", "", "b".
Parameters:
  c - the collection to hold the parsed results; a linked listis created if c is null.
Parameters:
  src - the string to parse
Parameters:
  separator - the separator, e.g., ',', '\n' or ' '.Note: if separator is ' ', it denotes any white space. the c collection if not null; or a linked listif c is null (so you can cast it to List)
exception:
  IllegalSyntaxException - if syntax errors
See Also:   Maps.parse




parse
final public static Collection parse(Collection c, String src, char separator, boolean handleBackslash)(Code)
Parses a string into a list. To quote a string, both '\'' and '"' are OK. Whitespaces are trimmed between quotation and separators.

Unlike Java, quotation could spread over multiple lines.

Example,
a b , ' c d',"'f'", '1' "2", 3
generate a list of "a b", "c d", "'f'", "1", "2" and "3". Note: the separator between "1" and "2" is optional.

Note: Like Java, if the string is ending with a separator, it will be ignored.

Example,
a, , b,
generate a list of "a", "", "b".
Parameters:
  c - the collection to hold the parsed results; a linked listis created if c is null.
Parameters:
  src - the string to parse
Parameters:
  separator - the separator, e.g., ',', '\n' or ' '.Note: if separator is ' ', it denotes any white space.
Parameters:
  handleBackslash - whether to treat '\\' specially (as escape char) the c collection if not null; or a linked listif c is null (so you can cast it to List)
exception:
  IllegalSyntaxException - if syntax errors
See Also:   Maps.parse




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.