1
2
3
4
5 package xjavadoc;
6
7 import java.util.Collection;
8
9 /***
10 * This class provides static factory methods that provide type-safe iterators
11 * over collections containing various xjavadoc classes.
12 *
13 * @created 29. juli 2002
14 * @deprecated Use a plain java.lang.Iterator and do the cast instead.
15 */
16 public abstract class XCollections
17 {
18
19 /***
20 * Returns a type-safe iterator for Collections containing XClass
21 *
22 * @param c the collection from which the iterator should be obtained
23 * @return a type-safe iterator for Collections containing XClass
24 */
25 public static ClassIterator classIterator( Collection c )
26 {
27 return new ClassIteratorImpl( c.iterator() );
28 }
29 /***
30 * Returns a type-safe iterator for Collections containing XField
31 *
32 * @param c the collection from which the iterator should be obtained
33 * @return a type-safe iterator for Collections containing XField
34 */
35 public static FieldIterator fieldIterator( Collection c )
36 {
37 return new FieldIteratorImpl( c.iterator() );
38 }
39 /***
40 * Returns a type-safe iterator for Collections containing XMethod
41 *
42 * @param c the collection from which the iterator should be obtained
43 * @return a type-safe iterator for Collections containing XMethod
44 */
45 public static MethodIterator methodIterator( Collection c )
46 {
47 return new MethodIteratorImpl( c.iterator() );
48 }
49 /***
50 * Returns a type-safe iterator for Collections containing XProgramElement
51 *
52 * @param c the collection from which the iterator should be obtained
53 * @return a type-safe iterator for Collections containing XProgramElement
54 */
55 public static ProgramElementIterator programElementIterator( Collection c )
56 {
57 return new ProgramElementIteratorImpl( c.iterator() );
58 }
59 /***
60 * Returns a type-safe iterator for Collections containing XConstructor
61 *
62 * @param c the collection from which the iterator should be obtained
63 * @return a type-safe iterator for Collections containing XConstructor
64 */
65 public static ConstructorIterator constructorIterator( Collection c )
66 {
67 return new ConstructorIteratorImpl( c.iterator() );
68 }
69 /***
70 * Returns a type-safe iterator for Collections containing XParameter
71 *
72 * @param c the collection from which the iterator should be obtained
73 * @return a type-safe iterator for Collections containing XParameter
74 */
75 public static ParameterIterator parameterIterator( Collection c )
76 {
77 return new ParameterIteratorImpl( c.iterator() );
78 }
79 /***
80 * Returns a type-safe iterator for Collections containing XTag
81 *
82 * @param c the collection from which the iterator should be obtained
83 * @return a type-safe iterator for Collections containing XTag
84 */
85 public static TagIterator tagIterator( Collection c )
86 {
87 return new TagIteratorImpl( c.iterator() );
88 }
89 /***
90 * Returns a type-safe iterator for Collections containing XPackage
91 *
92 * @param c the collection from which the iterator should be obtained
93 * @return a type-safe iterator for Collections containing XPackage
94 */
95 public static PackageIterator packageIterator( Collection c )/package-summary.html">> static PackageIterator packageIterator( Collection c )
96 {
97 return new PackageIteratorImpl( c.iterator() );
98 }
99 }