Android Open Source - CakeUI Cake Data Encapsulation






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;
/*from w w w  .j  a  v a2  s.c o  m*/
import java.io.Serializable;

/**
 * 
 * @author Sarah Caixeta
 * @email caixeta.sarah@gmail.com
 * 
 * Class that encapsulates data so the application can exchange different kinds of data between its components. 
 * 
 */
public class CakeDataEncapsulation implements Serializable{

  private static final long serialVersionUID = 1L;
  
  private DataType dataType;
  private Object content;
  
  public enum DataType {
    GENERIC_DATA, NETWORK_STATUS
  }
  
  /**
   * Constructor.
   * @param dataType - {@link DataType}
   * @param content - If the {@code dataType} is {@link DataType#NETWORK_STATUS}, the content must be either 
   * <code>R.string.broadcast_network_down</code> or <code>R.string.broadcast_network_up</code>. 
   * If {@code dataType} is {@link DataType#GENERIC_DATA}, the content can be any object. 
   */
  public CakeDataEncapsulation (DataType dataType, Object content){
    this.dataType = dataType;
    this.content = content;
  }
  
  public DataType getDataType(){
    return this.dataType;
  }
  
  public Object getContent(){
    return this.content;
  }
}




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