scolebourne    2004/05/15 04:59:15

  Modified:    collections/src/java/org/apache/commons/collections/bidimap
                        TreeBidiMap.java
  Log:
  Javadoc
  
  Revision  Changes    Path
  1.13      +27 -7     
jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java
  
  Index: TreeBidiMap.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TreeBidiMap.java  18 Feb 2004 00:57:39 -0000      1.12
  +++ TreeBidiMap.java  15 May 2004 11:59:15 -0000      1.13
  @@ -505,8 +505,8 @@
           
           // store previous and remove previous mappings
           Object prev = (index == KEY ? doGet(key, KEY) :  doGet(value, VALUE));
  -        doRemove((Comparable) key, KEY);
  -        doRemove((Comparable) value, VALUE);
  +        doRemove(key, KEY);
  +        doRemove(value, VALUE);
           
           Node node = rootNode[KEY];
           if (node == null) {
  @@ -1464,8 +1464,11 @@
        */
       static class View extends AbstractSet {
           
  +        /** The parent map. */
           protected final TreeBidiMap main;
  +        /** Whether to return KEY or VALUE order. */
           protected final int orderType;
  +        /** Whether to return KEY, VALUE, MAPENTRY or INVERSEMAPENTRY data. */
           protected final int dataType;
   
           /**
  @@ -1510,12 +1513,19 @@
        */
       static class ViewIterator implements OrderedIterator {
   
  +        /** The parent map. */
           protected final TreeBidiMap main;
  +        /** Whether to return KEY or VALUE order. */
           protected final int orderType;
  +        /** Whether to return KEY, VALUE, MAPENTRY or INVERSEMAPENTRY data. */
           protected final int dataType;
  +        /** The last node returned by the iterator. */
           protected Node lastReturnedNode;
  +        /** The next node to be returned by the iterator. */
           protected Node nextNode;
  +        /** The previous node in the sequence returned by the iterator. */
           protected Node previousNode;
  +        /** The modification count. */
           private int expectedModifications;
   
           /**
  @@ -1573,6 +1583,10 @@
               return doGetData();
           }
   
  +        /**
  +         * Gets the data value for the lastReturnedNode field.
  +         * @return the data value
  +         */
           protected Object doGetData() {
               switch (dataType) {
                   case KEY:
  @@ -1887,10 +1901,8 @@
            * Returns true if the given object is also a map entry and
            * the two entries represent the same mapping.
            *
  -         * @param o object to be compared for equality with this map
  -         *          entry.
  -         * @return true if the specified object is equal to this map
  -         *         entry.
  +         * @param obj  the object to be compared for equality with this entry.
  +         * @return true if the specified object is equal to this entry.
            */
           public boolean equals(final Object obj) {
               if (obj == this) {
  @@ -1921,11 +1933,19 @@
        */
       static class Inverse implements OrderedBidiMap {
           
  +        /** The parent map. */
           private final TreeBidiMap main;
  +        /** Store the keySet once created. */
           private Set keySet;
  +        /** Store the valuesSet once created. */
           private Set valuesSet;
  +        /** Store the entrySet once created. */
           private Set entrySet;
           
  +        /**
  +         * Constructor.
  +         * @param main  the main map
  +         */
           Inverse(final TreeBidiMap main) {
               super();
               this.main = main;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to