public static class IntPartitions.Partition extends java.lang.Object implements Indexable<IntPartitions.Part>
Indexable.Base<TT>, Indexable.IndexableSpliterator<TElem>, Indexable.ListView<T>
EMPTY, EMPTY_INDEXABLE_STRING
Modifier and Type | Method and Description |
---|---|
IntPartitions.Partition |
frozen()
Get a frozen version of this countable.
|
IntPartitions.Part |
get(int index)
Get the element at the given index.
|
int |
getSumOfCounts()
Get the sum over all counts.
|
int |
size()
Get the size.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToArray, addToArray, addToCollection, asBase, asCollection, asList, binarySearch, checkIndex, combine, compare, downCast, emptyIndexable, equal, findAll, findAllX, findFirst, findFirst, findFirst, findFirstX, findLast, findLast, findLast, findNext, findNext, findNext, findNextX, findPrevious, findPrevious, findPrevious, first, firstMatch, firstMatch, firstMatchX, forEachEntry, forEachEntryFragile, fromArray, fromCollection, fromCollection, fromCountable, fromCountable, fromEnumeration, fromEnumeration, fromIterable, fromIterable, fromIterable, fromIterable, fromIterator, fromList, fromOptional, frozenSpliterator, getMod, gyt, hash, headSet, indexedView, indexes, init, initByIndex, intIndexes, isEmpty, isOrdered, isStrictlyOrdered, iterator, iterator, last, listIterator, mapArray, optional, ordered, reverse, rotated, singleton, spliterator, subSet, sybSet, tailSet, toString, view, view, viewArray, viewArray, viewAsBooleanIndexable, viewAsByteIndexable, viewAsCharIndexable, viewAsDict, viewAsDoubleIndexable, viewAsFloatIndexable, viewAsIntIndexable, viewAsLongIndexable, viewAsShortIndexable, viewByIndex, viewFragile, viewList, viewList, viewListN, viewListN, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, viewTuple, withAppendedItem, withCachedHash, withExchangedItemAt, withInsertedItemAt, withRemovedItemAt, withSwappedItemsAt
addAllTo, combined, combined, containsEq, containsRef, downCast, empty, equal, equals, filtered, filteredToIndexable, filterToCountable, firstOrNull, foldLeft, forEachFragile, freeze, frozen, groupingBy, groupingBy, hasAll, hasAny, isSorted, isStrictlySorted, lastOrNull, mappingBy, mappingBy, optFirst, optLast, orderedCombination, sorted, toArray, toArray, toList, toString, uniform, viewCollection, viewCollection, viewCollectionN, viewCollectionN
public int getSumOfCounts()
counts
of all parts used in this partitionpublic IntPartitions.Part get(int index)
Indexable
get
in interface Indexable<IntPartitions.Part>
index
- index between 0
and size() - 1
public int size()
Sizeable
@NotNull public IntPartitions.Partition frozen()
Countable
Often countables are used as a view to underlying collections.
Although this interface is immutable, the underlying collection might
nevertheless change. This method copies the current state of this countable
into an unmodifiable state, and returns a Countable which is
stable in size and will return always the same elements.
Beware: it is still possible that any element itself changes when the
elements are mutable. Use Countable.frozen(Function, boolean)
to take care
of this.
Calling frozen()
again on the returned object will just return
the object itself, so you can safely call this method more than once.
frozen
in interface Countable<IntPartitions.Part>