~ubuntu-branches/ubuntu/saucy/freeguide/saucy

« back to all changes in this revision

Viewing changes to src/freeguide/common/lib/fgspecific/data/TVChannel.java

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Watkins
  • Date: 2008-09-07 15:49:32 UTC
  • mfrom: (1.2.6 upstream) (4.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080907154932-2jvgv76btq068fe0
Tags: 0.10.9-1
* New upstream release. (Closes: #492789)
* Moved package from contrib to main. (Closes: #492544)
* Added lintian override for 'build-depends-without-arch-dep ant', as ant is
  used in the clean target.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
import java.io.Serializable;
6
6
 
7
 
import java.util.Set;
8
7
import java.util.TreeSet;
9
8
 
10
9
/**
34
33
    protected String iconURL;
35
34
 
36
35
    /** List of programmes for channel. */
37
 
    protected Set<TVProgramme> programmes = new TreeSet<TVProgramme>(  );
 
36
    protected TreeSet<TVProgramme> programmes = new TreeSet<TVProgramme>();
38
37
 
39
38
/**
40
39
     * Create channel with specified ID. It should be locale-insensitive.
171
170
    {
172
171
        programme.setChannel( this );
173
172
 
174
 
        programmes.remove( programme );
 
173
        // Keep on removing programmes that overlap this one until there
 
174
        // aren't any more (note this TreeSet uses a
 
175
        // TVProgrammeOverlapIsEqualComparator
 
176
        while( programmes.remove( programme ) ) {}
 
177
 
 
178
        // Now add this one
175
179
        programmes.add( programme );
176
180
    }
177
181
 
193
197
     *
194
198
     * @return Iterator
195
199
     */
196
 
    public Set<TVProgramme> getProgrammes(  )
 
200
    public TreeSet<TVProgramme> getProgrammes(  )
197
201
    {
198
202
        return programmes;
199
203
    }