You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2003/01/15 22:49:14 UTC

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/iterators ProxyListIterator.java UniqueFilterIterator.java TransformIterator.java ProxyIterator.java

scolebourne    2003/01/15 13:49:14

  Modified:    collections/src/java/org/apache/commons/collections/iterators
                        ProxyListIterator.java UniqueFilterIterator.java
                        TransformIterator.java ProxyIterator.java
  Log:
  Update licence
  Update since and version tags
  
  Revision  Changes    Path
  1.2       +21 -24    jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyListIterator.java
  
  Index: ProxyListIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyListIterator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProxyListIterator.java	15 Aug 2002 23:13:51 -0000	1.1
  +++ ProxyListIterator.java	15 Jan 2003 21:49:14 -0000	1.2
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -23,11 +20,11 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  + *    any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -66,31 +63,37 @@
    * A proxy {@link ListIterator ListIterator} which delegates its
    * methods to a proxy instance.
    *
  - * @since 2.0
    * @see ProxyIterator
  + * @since Commons Collections 2.0
    * @version $Revision$ $Date$
  + * 
    * @author Rodney Waldhoff
    */
   public class ProxyListIterator implements ListIterator {
   
  -    // Constructor
  +    /** Holds value of property "iterator". */
  +    private ListIterator iterator;
  +
  +    // Constructors
       //-------------------------------------------------------------------------
   
       /**
  -     *  Constructs a new <Code>ProxyListIterator</Code> that will not 
  -     *  function until {@link #setListIterator(ListIterator) setListIterator}
  -     *  is invoked.
  +     * Constructs a new <Code>ProxyListIterator</Code> that will not 
  +     * function until {@link #setListIterator(ListIterator) setListIterator}
  +     * is invoked.
        */
       public ProxyListIterator() {
  +        super();
       }
   
       /**
  -     *  Constructs a new <Code>ProxyListIterator</Code> that will use the
  -     *  given list iterator.
  +     * Constructs a new <Code>ProxyListIterator</Code> that will use the
  +     * given list iterator.
        *
  -     *  @param iterator  the list iterator to use
  +     * @param iterator  the list iterator to use
        */
       public ProxyListIterator(ListIterator iterator) {
  +        super();
           this.iterator = iterator;
       }
   
  @@ -196,12 +199,6 @@
       public void setListIterator(ListIterator iterator) {
           this.iterator = iterator;
       }
  -
  -    // Attributes
  -    //-------------------------------------------------------------------------
  -
  -    /** Holds value of property "iterator". */
  -    private ListIterator iterator;
   
   }
   
  
  
  
  1.3       +19 -20    jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/UniqueFilterIterator.java
  
  Index: UniqueFilterIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/UniqueFilterIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- UniqueFilterIterator.java	12 Oct 2002 22:15:21 -0000	1.2
  +++ UniqueFilterIterator.java	15 Jan 2003 21:49:14 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -23,11 +20,11 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  + *    any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -64,15 +61,16 @@
   import java.util.Iterator;
   import org.apache.commons.collections.Predicate;
   
  -/** A FilterIterator which only returns "unique" Objects.  Internally,
  -  * the Iterator maintains a Set of objects it has already encountered,
  -  * and duplicate Objects are skipped.
  -  *
  -  * @author Morgan Delagrange
  -  * @version $Id$
  -  * @since 2.1
  -  */
  -
  +/** 
  + * A FilterIterator which only returns "unique" Objects.  Internally,
  + * the Iterator maintains a Set of objects it has already encountered,
  + * and duplicate Objects are skipped.
  + *
  + * @since Commons Collections 2.1
  + * @version $Revision$ $Date$
  + * 
  + * @author Morgan Delagrange
  + */
   public class UniqueFilterIterator extends FilterIterator {
          
       //-------------------------------------------------------------------------
  @@ -86,14 +84,15 @@
           super( iterator, new UniquePredicate() );
       }
   
  +    /**
  +     * Private Predicate needed to implement the unique behaviour.
  +     */
       private static class UniquePredicate implements Predicate {
  -
           HashSet set = new HashSet();
   
           public boolean evaluate(Object object) {
               return set.add(object);       
           }
  -
       }
   
   }
  
  
  
  1.3       +39 -33    jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/TransformIterator.java
  
  Index: TransformIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/TransformIterator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransformIterator.java	12 Oct 2002 22:15:21 -0000	1.2
  +++ TransformIterator.java	15 Jan 2003 21:49:14 -0000	1.3
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -23,11 +20,11 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  + *    any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -63,13 +60,16 @@
   import java.util.Iterator;
   import org.apache.commons.collections.Transformer;
   
  -/** A Proxy {@link Iterator Iterator} which uses a {@link Transformer Transformer} instance to 
  -  * transform the contents of the {@link Iterator Iterator} into some other form
  -  *
  -  * @since 1.0
  -  * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  */
  -
  +/** 
  + * A Proxy {@link Iterator Iterator} which uses a {@link Transformer Transformer}
  + * instance to transform the contents of the {@link Iterator Iterator} into 
  + * some other form.
  + *
  + * @since Commons Collections 1.0
  + * @version $Revision$ $Date$
  + * 
  + * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  + */
   public class TransformIterator extends ProxyIterator {
       
       /** Holds value of property transformer. */
  @@ -77,33 +77,34 @@
       
       
       /**
  -     *  Constructs a new <Code>TransformIterator</Code> that will not function
  -     *  until the {@link #setIterator(Iterator) setIterator} method is 
  -     *  invoked.
  +     * Constructs a new <Code>TransformIterator</Code> that will not function
  +     * until the {@link #setIterator(Iterator) setIterator} method is 
  +     * invoked.
        */
       public TransformIterator() {
  +        super();
       }
       
       /**
  -     *  Constructs a new <Code>TransformIterator</Code> that won't transform
  -     *  elements from the given iterator.
  +     * Constructs a new <Code>TransformIterator</Code> that won't transform
  +     * elements from the given iterator.
        *
  -     *  @param iterator  the iterator to use
  +     * @param iterator  the iterator to use
        */
  -    public TransformIterator( Iterator iterator ) {
  -        super( iterator );
  +    public TransformIterator(Iterator iterator) {
  +        super(iterator);
       }
   
       /**
  -     *  Constructs a new <Code>TransformIterator</Code> that will use the
  -     *  given iterator and transformer.  If the given transformer is null,
  -     *  then objects will not be transformed.
  +     * Constructs a new <Code>TransformIterator</Code> that will use the
  +     * given iterator and transformer.  If the given transformer is null,
  +     * then objects will not be transformed.
        *
  -     *  @param iterator  the iterator to use
  -     *  @param transformer  the transformer to use
  +     * @param iterator  the iterator to use
  +     * @param transformer  the transformer to use
        */
  -    public TransformIterator( Iterator iterator, Transformer transformer ) {
  -        super( iterator );
  +    public TransformIterator(Iterator iterator, Transformer transformer) {
  +        super(iterator);
           this.transformer = transformer;
       }
   
  @@ -115,13 +116,18 @@
   
       // Properties
       //-------------------------------------------------------------------------
  -    /** Getter for property transformer.
  +    /** 
  +     * Getter for property transformer.
  +     * 
        * @return Value of property transformer.
        */
       public Transformer getTransformer() {
           return transformer;
       }
  -    /** Setter for property transformer.
  +    
  +    /** 
  +     * Setter for property transformer.
  +     * 
        * @param transformer New value of property transformer.
        */
       public void setTransformer(Transformer transformer) {
  
  
  
  1.2       +26 -24    jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyIterator.java
  
  Index: ProxyIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/iterators/ProxyIterator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProxyIterator.java	15 Aug 2002 23:13:51 -0000	1.1
  +++ ProxyIterator.java	15 Jan 2003 21:49:14 -0000	1.2
  @@ -1,13 +1,10 @@
   /*
    * $Header$
  - * $Revision$
  - * $Date$
  - *
    * ====================================================================
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -23,11 +20,11 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:
  + *    any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
    * 4. The names "The Jakarta Project", "Commons", and "Apache Software
    *    Foundation" must not be used to endorse or promote products derived
  @@ -36,7 +33,7 @@
    *
    * 5. Products derived from this software may not be called "Apache"
    *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  + *    permission of the Apache Software Foundation.
    *
    * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  @@ -62,34 +59,39 @@
   
   import java.util.Iterator;
   
  -/** A Proxy {@link Iterator Iterator} which delegates its methods to a proxy instance.
  -  *
  -  * @since 1.0
  -  * @see ProxyListIterator
  -  * @version $Revision$ $Date$
  -  *
  -  * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  */
  -
  +/** 
  + * A Proxy {@link Iterator Iterator} which delegates its methods to a proxy instance.
  + *
  + * @see ProxyListIterator
  + * @since Commons Collections 1.0
  + * @version $Revision$ $Date$
  + * 
  + * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  + */
   public class ProxyIterator implements Iterator {
       
       /** Holds value of property iterator. */
       private Iterator iterator;
       
  +    // Constructors
  +    //-------------------------------------------------------------------------
  +
       /**
  -     *  Constructs a new <Code>ProxyIterator</Code> that will not function
  -     *  until {@link #setIterator(Iterator)} is called.
  +     * Constructs a new <Code>ProxyIterator</Code> that will not function
  +     * until {@link #setIterator(Iterator)} is called.
        */
       public ProxyIterator() {
  +        super();
       }
       
       /**
  -     *  Constructs a new <Code>ProxyIterator</Code> that will use the
  -     *  given iterator.
  +     * Constructs a new <Code>ProxyIterator</Code> that will use the
  +     * given iterator.
        *
  -     *  @param iterator  the underyling iterator
  +     * @param iterator  the underyling iterator
        */
  -    public ProxyIterator( Iterator iterator ) {
  +    public ProxyIterator(Iterator iterator) {
  +        super();
           this.iterator = iterator;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>