@Test public void testSerialization() throws IOException, ClassNotFoundException { TaskSeries s1 = new TaskSeries("S"); s1.add(new Task("T1", new Date(1), new Date(2))); s1.add(new Task("T2", new Date(11), new Date(22))); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(s1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()) ); TaskSeries s2 = (TaskSeries) in.readObject(); in.close(); assertEquals(s1, s2); }
public void add(Task task) { if (task == null) { throw new IllegalArgumentException("Null 'task' argument."); } this.tasks.add(task); fireSeriesChanged(); }
TaskSeries extends Series { public void add(Task task) { if (task == null) { throw new IllegalArgumentException("Null 'task' argument."); } this.tasks.add(task); fireSeriesChanged(); } }
TaskSeries extends Series { public void add(Task task) { if (task == null) { throw new IllegalArgumentException("Null 'task' argument."); } this.tasks.add(task); fireSeriesChanged(); } TaskSeries(String name); }
TaskSeries extends Series { public void add(Task task) { if (task == null) { throw new IllegalArgumentException("Null 'task' argument."); } this.tasks.add(task); fireSeriesChanged(); } TaskSeries(String name); void add(Task task); void remove(Task task); void removeAll(); @Override int getItemCount(); Task get(int index); Task get(String description); List<Task> getTasks(); @Override boolean equals(Object obj); @Override Object clone(); }
TaskSeries extends Series { public void add(Task task) { if (task == null) { throw new IllegalArgumentException("Null 'task' argument."); } this.tasks.add(task); fireSeriesChanged(); } TaskSeries(String name); void add(Task task); void remove(Task task); void removeAll(); @Override int getItemCount(); Task get(int index); Task get(String description); List<Task> getTasks(); @Override boolean equals(Object obj); @Override Object clone();  }