Class DfsObjDatabase.PackSource.ComparatorBuilder
java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsObjDatabase.PackSource.ComparatorBuilder
- Enclosing class:
DfsObjDatabase.PackSource
Builder for describing
DfsObjDatabase.PackSource
ordering where some values are
explicitly considered equal to others.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private final Map
<DfsObjDatabase.PackSource, Integer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(DfsObjDatabase.PackSource... sources) Add a collection of sources that should sort as equal.build()
Build the comparator.
-
Field Details
-
ranks
-
counter
private int counter
-
-
Constructor Details
-
ComparatorBuilder
public ComparatorBuilder()
-
-
Method Details
-
add
Add a collection of sources that should sort as equal.Sources in the input will sort after sources listed in previous calls to this method.
- Parameters:
sources
- sources in this equivalence class.- Returns:
- this.
-
build
Build the comparator.- Returns:
- new comparator instance.
- Throws:
IllegalArgumentException
- not allDfsObjDatabase.PackSource
instances were explicitly assigned an equivalence class.
-