Android Open Source - observer Place






From Project

Back to project page observer.

License

The source code is released under:

GNU General Public License

If you think the Android project observer 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 uk.ac.horizon.observer.model;
/*from  www  .j av  a 2  s . c o  m*/
import java.util.Date;
import java.util.Stack;

/**
 * An observable place
 * @author Jesse
 */
public class Place extends Observation {
  private Stack<Task> tasks = new Stack<Task>();
  private Integer[] myDisabledTaskList;
  
  public Place(String name, Stack<Task> tasks, Integer[] disabledTaskList){
    super(name, "place");
    this.tasks = tasks;
                       // This is commented out to prevent greying out.
    myDisabledTaskList = new Integer[]{};//disabledTaskList;
  }
  
  public Integer[] getDisabledTasks(){
    return myDisabledTaskList;
  }
  
  public Stack<Task> getTasks(){
    return tasks;
  }
  
  public void pushTask(Task task){
    tasks.push(task);
  }
  
  public Task popTask(){
    return tasks.pop();
  }
  
  public Task peekTask(){
    return tasks.peek();
  }
  
  public int size(){
    return tasks.size();
  }
  
  public void setDate(long date){
    this.observationTime = new Date(date);
  }
}




Java Source Code List

uk.ac.horizon.observer.model.Observation.java
uk.ac.horizon.observer.model.Place.java
uk.ac.horizon.observer.model.Places.java
uk.ac.horizon.observer.model.Stop.java
uk.ac.horizon.observer.model.TaskBin.java
uk.ac.horizon.observer.model.Task.java
uk.ac.horizon.observer.vc.PlacesActivity.java
uk.ac.horizon.observer.vc.PlacesFragment.java
uk.ac.horizon.observer.vc.SettingsActivity.java
uk.ac.horizon.observer.vc.SettingsFragment.java
uk.ac.horizon.observer.vc.TaskFragment.java
uk.ac.horizon.observer.vc.TasksActivity.java