FileDocCategorySizeDatePackage
Schedule.javaAPI DocExample1711Mon Aug 27 20:11:36 BST 2007com.google.gwt.sample.dynatable.client

Schedule

public class Schedule extends Object implements com.google.gwt.user.client.rpc.IsSerializable
Hold the relevant data for a Schedule. This class is meant to be serialized in RPC calls.

Fields Summary
private List
timeSlots
Constructors Summary
public Schedule()


    
  
Methods Summary
public voidaddTimeSlot(TimeSlot timeSlot)

    timeSlots.add(timeSlot);
  
public java.lang.StringgetDescription(boolean[] daysFilter)

    String s = null;
    for (Iterator iter = timeSlots.iterator(); iter.hasNext();) {
      TimeSlot timeSlot = (TimeSlot) iter.next();
      if (daysFilter[timeSlot.getDayOfWeek()]) {
        if (s == null) {
          s = timeSlot.getDescription();
        } else {
          s += ", " + timeSlot.getDescription();
        }
      }
    }

    if (s != null) {
      return s;
    } else {
      return "";
    }
  
public java.lang.StringtoString()

    return getDescription(null);