Task.java :  » Log » cogtomp » cogtomp » autoCal » Android Open Source

Android Open Source » Log » cogtomp 
cogtomp » cogtomp » autoCal » Task.java
package cogtomp.autoCal;

import java.util.LinkedList;
import java.util.UUID;

public class Task {
  public String name;
  public final UUID ID;
  public int length = 0;
  public int startTime = 0;
  public LinkedList<Duration> durations = new LinkedList<Duration>();
  public Cacher cacher;
    
  public Task() {
    ID = UUID.randomUUID();
  }
  public Task(UUID id) {
    ID = id;
  }
  
  public void cacheData()
  {
    if (cacher != null)
      return;
    
    cacher = new Cacher();
    for (Duration d: durations)
      for (Step s : d.steps)
        cacher.steps.add(s);
    cacher.start();
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.