You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/09/20 20:29:30 UTC

svn commit: r1388152 - in /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie: KeyAnalyzer.java PatriciaTrieBase.java

Author: tn
Date: Thu Sep 20 18:29:30 2012
New Revision: 1388152

URL: http://svn.apache.org/viewvc?rev=1388152&view=rev
Log:
Javadoc formatting.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/KeyAnalyzer.java
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/KeyAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/KeyAnalyzer.java?rev=1388152&r1=1388151&r2=1388152&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/KeyAnalyzer.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/KeyAnalyzer.java Thu Sep 20 18:29:30 2012
@@ -23,8 +23,8 @@ import java.util.Comparator;
  * Defines the interface to analyze {@link Trie} keys on a bit level. 
  * {@link KeyAnalyzer}'s methods return the length of the key in bits, 
  * whether or not a bit is set, and bits per element in the key. 
- * 
- * <p>Additionally, a method determines if a key is a prefix of another 
+ * <p>
+ * Additionally, a method determines if a key is a prefix of another 
  * key and returns the bit index where one key is different from another 
  * key (if the key and found key are equal than the return value is 
  * {@link #EQUAL_BIT_KEY}).
@@ -52,31 +52,34 @@ public interface KeyAnalyzer<K> extends 
     /**
      * Returns the number of bits per element in the key.
      * This is only useful for variable-length keys, such as Strings.
+     * 
+     * @return the number of bits per element
      */
     public int bitsPerElement();
     
     /** 
-     * Returns the length of the Key in bits. 
+     * Returns the length of the Key in bits.
+     * 
+     * @param key  the key
+     * @return the bit length of the key
      */
     public int lengthInBits(K key);
     
     /** 
-     * Returns whether or not a bit is set 
+     * Returns whether or not a bit is set.
      */
     public boolean isBitSet(K key, int bitIndex, int lengthInBits);
     
     /**
-     * Returns the n-th different bit between key and found.
-     * This starts the comparison in key at 'keyStart' and goes
-     * for 'keyLength' bits, and compares to the found key
-     * starting at 'foundStart' and going for 'foundLength' bits.
+     * Returns the n-th different bit between key and found. This starts the comparison in
+     * key at 'keyStart' and goes for 'keyLength' bits, and compares to the found key starting
+     * at 'foundStart' and going for 'foundLength' bits.
      */
-    public int bitIndex(K key, int offsetInBits, int lengthInBits, 
-            K other, int otherOffsetInBits, int otherLengthInBits);
+    public int bitIndex(K key, int offsetInBits, int lengthInBits,
+                        K other, int otherOffsetInBits, int otherLengthInBits);
     
     /**
-     * Determines whether or not the given prefix (from offset to length)
-     * is a prefix of the given key.
+     * Determines whether or not the given prefix (from offset to length) is a prefix of the given key.
      */
     public boolean isPrefix(K prefix, int offsetInBits, int lengthInBits, K key);
 }

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java?rev=1388152&r1=1388151&r2=1388152&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/trie/PatriciaTrieBase.java Thu Sep 20 18:29:30 2012
@@ -201,8 +201,7 @@ abstract class PatriciaTrieBase<K, V> ex
             }
         }
         
-        throw new IndexOutOfBoundsException("Failed to put: " 
-                + key + " -> " + value + ", " + bitIndex);
+        throw new IndexOutOfBoundsException("Failed to put: " + key + " -> " + value + ", " + bitIndex);
     }
     
     /**