de.smartics.maven.issues.bugzilla
Class Versions

Package class diagram package Versions
java.lang.Object
  extended by de.smartics.maven.issues.bugzilla.Versions
All Implemented Interfaces:
Iterable< Versions.VersionedSections>

public class Versions
     
     
extends Object
implements Iterable< Versions.VersionedSections>

Contains sections separated by their versions. The versions are not required to be known in advance.

Author:
Robert Reiner

Nested Class Summary
static class Versions.VersionedSections
          A versioned sections information bundle.
 
Constructor Summary
Versions(List<String> sectionNames)
          Convenience constructor using the InverseVersionComparator to sort the version from large to small.
Versions(List<String> sectionNames, Comparator<org.apache.maven.artifact.versioning.ArtifactVersion> comparator)
          Default constructor.
 
Method Summary
 boolean add(org.apache.maven.artifact.versioning.ArtifactVersion version, String sectionName, org.eclipse.mylyn.tasks.core.data.TaskData taskData)
          Adds the task data to the section within the version.
 Iterator<Versions.VersionedSections> iterator()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Versions

public Versions(List<String> sectionNames)
         throws NullPointerException
Convenience constructor using the InverseVersionComparator to sort the version from large to small.

Parameters:
sectionNames - the list of sections to be put to the sections instance.
Throws:
NullPointerException - if the sectionNames list is null.

Versions

public Versions(List<String> sectionNames,
                Comparator<org.apache.maven.artifact.versioning.ArtifactVersion> comparator)
         throws NullPointerException
Default constructor.

Parameters:
sectionNames - the list of sections to be put to the sections instance.
comparator - the comparator to use to sort the versions. If NullPointerException, the natural ordering is used.
Throws:
NullPointerException - if the sectionNames list is null.
Method Detail

add

public boolean add(org.apache.maven.artifact.versioning.ArtifactVersion version,
                   String sectionName,
                   org.eclipse.mylyn.tasks.core.data.TaskData taskData)
Adds the task data to the section within the version. If the section is not managed, the task data is not added.

Parameters:
version - the version to select the section.
sectionName - the name of the section to add the task data to.
taskData - the task data to add to the given section.
Returns:
true if the task data is added, false if not.

iterator

public Iterator<Versions.VersionedSections> iterator()

Specified by:
iterator in interface Iterable<Versions.VersionedSections>
See Also:
Iterable.iterator()


Copyright © 2008-2010 Kronseder & Reiner GmbH - smartics. All Rights Reserved.