de.phleisch.app.itsucks.job.impl
Class SimpleJobListImpl

java.lang.Object
  extended by de.phleisch.app.itsucks.event.impl.SimpleDirectEventSource
      extended by de.phleisch.app.itsucks.job.impl.SimpleJobListImpl
All Implemented Interfaces:
DirectEventSource, JobList

public class SimpleJobListImpl
extends SimpleDirectEventSource
implements JobList

Default implementation of the JobList Interface. It uses a combination of an Set and a Map to optimize sorting and accessing jobs.

Author:
olli

Field Summary
 
Fields inherited from interface de.phleisch.app.itsucks.job.JobList
EVENT_JOB_ADDED, EVENT_JOB_CHANGED, EVENT_JOB_REMOVED, NOTIFICATION_JOB_ADDED, NOTIFICATION_JOB_CHANGED, NOTIFICATION_JOB_REMOVED
 
Constructor Summary
SimpleJobListImpl()
           
 
Method Summary
 void addJob(Job pJob)
           
 void clear()
           
 java.util.Collection<Job> getContent()
           
 Job getNextOpenJob()
           
protected  void handleJobChanged(Job pJob, java.beans.PropertyChangeEvent pEvt)
          When a job has changed, the ordering of the list must be refreshed
 boolean removeJob(Job pJob)
           
 int size()
           
 
Methods inherited from class de.phleisch.app.itsucks.event.impl.SimpleDirectEventSource
fireEvent, registerObserver, unregisterObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.phleisch.app.itsucks.event.DirectEventSource
registerObserver, unregisterObserver
 

Constructor Detail

SimpleJobListImpl

public SimpleJobListImpl()
Method Detail

addJob

public void addJob(Job pJob)
Specified by:
addJob in interface JobList

removeJob

public boolean removeJob(Job pJob)
Specified by:
removeJob in interface JobList

clear

public void clear()
Specified by:
clear in interface JobList

getNextOpenJob

public Job getNextOpenJob()
Specified by:
getNextOpenJob in interface JobList

getContent

public java.util.Collection<Job> getContent()
Specified by:
getContent in interface JobList

handleJobChanged

protected void handleJobChanged(Job pJob,
                                java.beans.PropertyChangeEvent pEvt)
When a job has changed, the ordering of the list must be refreshed

Parameters:
pEvt -

size

public int size()
Specified by:
size in interface JobList


Copyright © 2010. All Rights Reserved.