]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Replaced iterator with getLength/get(i).
authorPeter Bernard West <pbwest@apache.org>
Fri, 11 Oct 2002 23:46:51 +0000 (23:46 +0000)
committerPeter Bernard West <pbwest@apache.org>
Fri, 11 Oct 2002 23:46:51 +0000 (23:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195324 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/pagination/PageMasterAlternatives.java

index 99355546d3d1824b956060c5adc084399276ed5c..4c8456c04c16b5642df7da5f9adc2948b8266cd7 100644 (file)
@@ -10,7 +10,6 @@
 package org.apache.fop.fo.pagination;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 
 // FOP
 import org.apache.fop.fo.pagination.PageCondition;
@@ -55,10 +54,20 @@ public class PageMasterAlternatives {
     }
 
     /**
-     * Get an <tt>Iterator</tt> over the set of alternative conditions.
-     * @return the <tt>Iterator</tt>.
+     * Get the length of the <i>alternatives</i> <tt>ArrayList</tt>.
+     * @return - the length.
      */
-    public Iterator conditions() {
-       return alternatives.iterator();
+    public int getAlternativesLength() {
+        return alternatives.size();
     }
+
+    /**
+     * Get the indexed <tt>PageMasterAlternatives</tt> master.
+     * @param i - the index of the master to retrieve.
+     * @return - the indexed <tt>PageMasterAlternatives</tt> master.
+     */
+    public PageCondition getAlternative(int i) {
+        return (PageCondition)(alternatives.get(i));
+    }
+
 }