incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickcha...@apache.org
Subject svn commit: rev 21629 - incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/util
Date Thu, 24 Jun 2004 06:38:28 GMT
Author: nickchalko
Date: Wed Jun 23 23:38:27 2004
New Revision: 21629

Modified:
   incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/util/VersionDataRangeIterator.java
Log:
Organized Imports.

Modified: incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/util/VersionDataRangeIterator.java
==============================================================================
--- incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/util/VersionDataRangeIterator.java
(original)
+++ incubator/depot/trunk/version/src/java/org/apache/depot/version/impl/data/util/VersionDataRangeIterator.java
Wed Jun 23 23:38:27 2004
@@ -16,99 +16,81 @@
 
 package org.apache.depot.version.impl.data.util;
 
-import java.util.Iterator;
-
 import org.apache.depot.version.impl.data.VersionData;
 
 /**
  * @author ajack
  */
 public class VersionDataRangeIterator extends VersionDataIterator {
-    protected VersionDataRange m_range = null;
+	protected VersionDataRange m_range = null;
+
+	public VersionDataRangeIterator(VersionData lower, VersionData higher) {
+		super(lower);
 
-    public VersionDataRangeIterator(
-        VersionData lower,
-    VersionData higher) {
-        super(lower);
-
-        m_range =
-            new VersionDataRange(
-                VersionDataComparison.getGreaterThanOrEqual(lower),
-                VersionDataComparison.getLessThanOrEqual(higher));
-    }
-
-    public VersionDataRangeIterator(
-    VersionData lower,
-    VersionData higher,
-        VersionDataIncrementor incrementor) {
-        super(lower, incrementor);
-
-        m_range =
-            new VersionDataRange(
-                VersionDataComparison.getGreaterThanOrEqual(lower),
-                VersionDataComparison.getLessThanOrEqual(higher));
-    }
-
-    public VersionDataRangeIterator(VersionDataRange range) {
-        super(range.getLower().getComparison());
-
-        m_range = range;
-    }
-
-    public VersionDataRangeIterator(
-        VersionDataRange range,
-        VersionDataIncrementor incrementor) {
-        super(range.getLower().getComparison(), incrementor);
-
-        m_range = range;
-    }
-
-    /**
-     * @see java.util.Iterator#hasNext()
-     */
-    public boolean hasNext() {
-        return (null != m_next);
-    }
-
-    /**
-     * @see java.util.Iterator#remove()
-     */
-    public void remove() {
-        skipToNext();
-    }
-
-    protected void skipToNext() {
-        super.skipToNext();
-
-        if (m_next != null) {
-            //VersionLogger.g_log.debug("RSkip :" + m_next);
-
-            if (!m_range.inRange(m_next))
-                m_next = null;
-
-            //VersionLogger.g_log.debug("RNext:" + m_next);
-        }
-    }
-
-    	/* Tests ought be unit tests...
-    public static void main(String args[]) throws Exception {
-        VersionData lower = new VersionData(1, 1, "alpha", 1, 1, 1);
-        VersionData upper = new VersionData(1, 1, "alpha", 1, 1, 10);
-
-        int count = 0;
-        for (Iterator i =
-            new VersionDataRangeIterator(
-                lower,
-                upper,
-                VersionDataIncrementor.POINT);
-            i.hasNext();
-            ++count) {
-            System.out.println("Count:" + count);
-            i.next();
-        }
-
-        System.out.println("Total Count:" + count);
-    }
-    
-    */
-}
+		m_range = new VersionDataRange(VersionDataComparison
+				.getGreaterThanOrEqual(lower), VersionDataComparison
+				.getLessThanOrEqual(higher));
+	}
+
+	public VersionDataRangeIterator(VersionData lower, VersionData higher,
+			VersionDataIncrementor incrementor) {
+		super(lower, incrementor);
+
+		m_range = new VersionDataRange(VersionDataComparison
+				.getGreaterThanOrEqual(lower), VersionDataComparison
+				.getLessThanOrEqual(higher));
+	}
+
+	public VersionDataRangeIterator(VersionDataRange range) {
+		super(range.getLower().getComparison());
+
+		m_range = range;
+	}
+
+	public VersionDataRangeIterator(VersionDataRange range,
+			VersionDataIncrementor incrementor) {
+		super(range.getLower().getComparison(), incrementor);
+
+		m_range = range;
+	}
+
+	/**
+	 * @see java.util.Iterator#hasNext()
+	 */
+	public boolean hasNext() {
+		return (null != m_next);
+	}
+
+	/**
+	 * @see java.util.Iterator#remove()
+	 */
+	public void remove() {
+		skipToNext();
+	}
+
+	protected void skipToNext() {
+		super.skipToNext();
+
+		if (m_next != null) {
+			//VersionLogger.g_log.debug("RSkip :" + m_next);
+
+			if (!m_range.inRange(m_next))
+				m_next = null;
+
+			//VersionLogger.g_log.debug("RNext:" + m_next);
+		}
+	}
+
+	/*
+	 * Tests ought be unit tests... public static void main(String args[])
+	 * throws Exception { VersionData lower = new VersionData(1, 1, "alpha", 1,
+	 * 1, 1); VersionData upper = new VersionData(1, 1, "alpha", 1, 1, 10);
+	 * 
+	 * int count = 0; for (Iterator i = new VersionDataRangeIterator( lower,
+	 * upper, VersionDataIncrementor.POINT); i.hasNext(); ++count) {
+	 * System.out.println("Count:" + count); i.next(); }
+	 * 
+	 * System.out.println("Total Count:" + count); }
+	 *  
+	 */
+}
\ No newline at end of file

Mime
View raw message