title: 3 dimensional ConcurrentSkipListMap map
body: <p>I have written 3 dimensional <code>ConcurrentSkipListMap</code>, but not able to figure out a way to iterate over it. How do i define a <code>iterator</code> for the same.</p>
  
  <pre><code>import java.util.concurrent.ConcurrentSkipListMap;
  /**
   * Helper implementation to handle 3 dimensional sorted maps
   */
  public class MyCustomIndex {
      private ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt;&gt; table;
  
      public MyCustomIndex() {
          this.table = new ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt;&gt;(new CustomComparator); 
      }
      /**
       * 
       * @param K
       * @param F
       * @param Q
       */
      public void put(byte[] K, byte[] F, byte[] Q) {
          ConcurrentSkipListMap&lt;byte[], byte[]&gt; QToDummyValueMap; 
          ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt; FToQMap;
  
          if( table.containsK(K)) {
              FToQMap = table.get(K);
              if ( FToQMap.containsK(F)) {
                  QToDummyValueMap = FToQMap.get(F);
              } else {
                  QToDummyValueMap = new ConcurrentSkipListMap&lt;byte[], byte[]&gt;(new CustomComparator); 
              }
          } else {
              QToDummyValueMap = new ConcurrentSkipListMap&lt;byte[], byte[]&gt;(new CustomComparator);
              FToQMap = new ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt;(new CustomComparator);
          }       
          QToDummyValueMap.put(Q, new byte[0]);
          FToQMap.put(F, QToDummyValueMap);
          table.put(K, FToQMap);
      }
  
      public ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt;&gt; gettable() {
          return table;
      }
      public void settable(
              ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], ConcurrentSkipListMap&lt;byte[], byte[]&gt;&gt;&gt; table) {
          this.table = table;
      }
  
  }
  </code></pre>