Android Open Source - CakeUI Cake Map






From Project

Back to project page CakeUI.

License

The source code is released under:

GNU General Public License

If you think the Android project CakeUI listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cakeui.utils;
//w  w  w  .  j a v a 2  s .  c o  m
import java.util.Iterator;
import java.util.Set;
import java.util.TreeMap;

/**
 * 
 * @author Mariana Azevedo
 * @email mariana@bsi.ufla.br
 * 
 * @author Sarah Caixeta
 * @email caixeta.sarah@gmail.com
 * 
 * Class that implements a generic TreeMap.
 *
 */

public class CakeMap<T, E> extends TreeMap<T, E> {

  /**
   * 
   */
  private static final long serialVersionUID = 4162502760579250465L;

  public CakeMap(){
    super(new CakeComparator<T>());
  }
  
  public T getKeyFromIndex(int index){
    
    int indexOf = 0;
    Set<T> set = this.keySet();
    
    Iterator<T> itSet = set.iterator();
    
    while (itSet.hasNext()){
      
      T object = itSet.next();
      
      if (indexOf == index)
        return object;
      
      indexOf++;
    }
    
    return null;
  }
  
  public E getEntryFromIndex(int indexKey){
    
    T keyObject = getKeyFromIndex(indexKey);
    
    E entryObject = this.get(keyObject);
    
    return entryObject;
    
  }
  
}




Java Source Code List

com.cakeui.application.CakeApplication.java
com.cakeui.generic.activity.CakeActivity.java
com.cakeui.generic.adapter.CakeExpandableListViewAdapter.java
com.cakeui.generic.adapter.CakeGridViewAdapter.java
com.cakeui.generic.adapter.CakeListViewAdapter.java
com.cakeui.generic.dialog.CakeDialog.java
com.cakeui.generic.fragment.CakeFragment.java
com.cakeui.generic.service.CakePeriodicService.java
com.cakeui.generic.service.CakeService.java
com.cakeui.utils.CakeAsyncTask.java
com.cakeui.utils.CakeBroadcastReceiver.java
com.cakeui.utils.CakeComparator.java
com.cakeui.utils.CakeDataEncapsulation.java
com.cakeui.utils.CakeMap.java
com.cakeui.utils.enums.AsyncTaskType.java
com.cakeui.utils.enums.DialogType.java
com.cakeui.utils.enums.PagesOpen.java