Package org.apache.sling.feature

# Class Bundles

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Artifact>
org.apache.sling.feature.Artifacts
org.apache.sling.feature.Bundles

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Iterable<Artifact>`, `Collection<Artifact>`, `List<Artifact>`, `RandomAccess`

public class Bundles extends Artifacts
Groups a list of bundles `Artifact` and provides a means to sort them based on start order. This class is not thread-safe.

See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class java.util.AbstractList

`modCount`

## Constructor Summary

Constructors
Constructor
Description
`Bundles()`

## Method Summary

Modifier and Type
Method
Description
`Map<Integer,List<Artifact>>`
`getBundlesByStartOrder()`
Get the map of all bundles sorted by start order.

### Methods inherited from class org.apache.sling.feature.Artifacts

`add, containsExact, containsSame, getExact, getSame, removeExact, removeSame`

### Methods inherited from class java.util.ArrayList

`add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize`

### Methods inherited from class java.util.AbstractList

`equals, hashCode`

### Methods inherited from class java.util.AbstractCollection

`containsAll, toString`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Collection

`parallelStream, stream`

### Methods inherited from interface java.util.List

`containsAll, equals, hashCode`

## Constructor Details

### Bundles

public Bundles()

## Method Details

### getBundlesByStartOrder

public Map<Integer,List<Artifact>> getBundlesByStartOrder()
Get the map of all bundles sorted by start order. The map is sorted and iterating over the keys is done in start order. Bundles without a start order (having the value 0) are returned last.

Returns:
  The map of bundles. The map is unmodifiable.