Class ArtifactGroup

All Implemented Interfaces:
Comparable<ArtifactGroup>, Iterable<Artifact>

public class ArtifactGroup extends ItemList<Artifact> implements Comparable<ArtifactGroup>
A artifact group holds a set of artifacts. A valid start level is positive, start level 0 means the default OSGi start level.
  • Constructor Details

    • ArtifactGroup

      public ArtifactGroup(int startLevel)
      Create a new artifact group with the level.
      Parameters:
      startLevel - The start level.
  • Method Details

    • add

      public void add(Artifact item)
      Description copied from class: ItemList
      Add a new item
      Overrides:
      add in class ItemList<Artifact>
      Parameters:
      item - The new item
    • getStartLevel

      public int getStartLevel()
      Get the start level.
      Returns:
      The start level.
    • search

      public Artifact search(Artifact template)
      Search an artifact with the same groupId, artifactId, type and classifier. Version is not considered.
      Parameters:
      template - A template artifact
      Returns:
      The artifact or null.
    • compareTo

      public int compareTo(ArtifactGroup o)
      Specified by:
      compareTo in interface Comparable<ArtifactGroup>
    • toString

      public String toString()
      Overrides:
      toString in class ItemList<Artifact>