- Require Java 11.
- Renamed
*Plume
classes to*P
, for brevity; for example, useCollectionsP
instead ofCollectionsPlume
. - Removed all deprecated classes and mehods.
OrderedPairIterator
: usesIPair
instead ofMPair
ArraysPlume
: deprecatedsorted()
in favor ofisSorted()
StringsPlume
:firstLineSeparator()
can return null- new method
mapToStringLinewise()
- new method
isVersionNumberLE()
- new class
VersionNumberComparator
CollectionsPlume
: new methodsanyMatch()
,allMatch()
,noneMatch()
CollectionsPlume
:- deprecated
Filter
; usejava.util.function.Predicate
instead - new method
replace(Collection<T> c, Collection<Replacement<T>> replacements)
- new method
isSubsequenceMaybeNonContiguous(Iterable<T>, Iterable<T>)
- deprecated
StringsPlume
:- new methods
splitRetainSeparators()
andsplitLinesRetainSeparators()
- new methods
FilesPlume
:- deprecate
fileContents()
in favor of new methodreadString()
- deprecate
writeFile()
in favor of new methodwriteString()
- new method
readLinesRetainingSeparators()
- new method
writeString(Path, String)
- deprecate
- Don't use
@InlineMe
, which breaks javac in some clients.
FilesPlume
:- deprecate
readFile()
in favor offileContents()
- deprecate
StringsPlume
:- new method
firstLineSeparator(String)
- improved behavior of
splitLines(String)
- new method
CollectionsPlume
:- new method
indexOf(list, value, startIndex)
- new method
StringsPlume
:rpad
andlpad
add an ellipsis ("...") if it truncatesrpad(double, ...)
does not truncate values before the decimal point- add
rpad
that pads with an arbitrary character - add
rpad
that never truncates - add
lpad
that never truncates
CollectionsPlume
:- add methods
duplicates()
andlistFilter()
- add an overload for
mapCapacity()
- deprecated
noDuplicates()
; usehasNoDuplicates()
instead - deprecated
listFilter()
; usefilter()
instead
- add methods
ArraysPlume
:- deprecated
noDuplicates()
; usehasNoDuplicates()
instead
- deprecated
CollectionsPlume
: remove conflicting overrides ofdeepCopy()
IPair
andMPair
: rename fields froma
andb
tofirst
andsecond
MPair
: new methodscloneElements()
,deepCopy()
,deepCopyFirst()
,deepCopySecond()
StringsPlume
: addrpad
that pads with an arbitrary characterFilesPlume
: newInputStream
methodsavailable()
,isWhitespaceOnly()
,readCodePoint()
- Deprecated
Pair
class for mutable pairs; useMPair
instead.OrderedPairIterator
usesMPair
instead ofPair
. - New class
IPair
for immutable pairs. - The
WeakIdentityPair
constructor is deprecated in favor of theof()
method. - New interface
DeepCopyable
. - New methods in
UtilPlume
:firstNonNull()
- New methods in
CollectionsPlume
:- for
Collection
s:cloneElements()
,deepCopy()
- for
Map
s:cloneElements()
,cloneValues()
,createLruCache()
- for
- Moved classes
Hasher
,WeakHasherMap
, andWeakIdentityHashMap
to a new project, hashmap-util. It is available on Maven Central. - In
ArraySet
:- new method
ArraySet.sort
. - widened the formal parameter type of
newArraySetOrHashSet
andnewArraySetOrLinkedHashSet
.
- new method
- New methods in
CollectionsPlume
:sortedSetContainsAll
,sortedSetEquals
, andwithoutDuplicatesSorted
.deepCopy(List)
,deepCopy(TreeSet)
,deepCopy(Map)
, anddeepCopyValues(Map)
.
- New method
UtilPlume.clone(Object)
. - New method
StringsPlume.toStringTruncated(Object, int)
. - In
ArraysPlume
, the generic signatures ofisSubarrayEq
andindexOfEq
have changed. Let us know if this causes a problem.
- New methods
newArrayMapOrHashMap
,newArrayMapOrLinkedHashMap
,newArraySetOrHashSet
, andnewArraySetOrLinkedHashSet
. - Bug fixes in collection methods.
- New method
StringsPlume.isBlank()
. - Don't use
@InlineMe
, which breaks javac in some clients.
- New methods in
CollectionsPlume
:adjoin
,adjoinAll
,listUnion
,listIntersection
. - New classes
ArraySet
andIdentityArraySet
for very small sets. - New classes
MostlySingletonSet
,AbstractMostlySingletonSet
, andIdentityMostlySingletonSet
. - New class
UnmodifiableIdentityHashMap
.
- New class
ArrayMap
is an efficient representation for very small maps. - New methods
FilesPlume.createTempFile(...)
create sequential file names. - New methods in
RegexUtil
:matchesSomeRegex
,everyStringMatchesSomeRegex
,matchesNoRegex
,noStringMatchesAnyRegex
. - Some constructors are deprecated, for efficiency.
- Support Java 18.
- Java 17 is supported.
- Bug fix in
System.gcPercentage
.
- Bug fix: make
System.gcUsageMessage
static.
- New method
System.gcUsageMessage
is easier to use thangcPercentage
. - Method
SystemPlume.gcPercentage
is now more efficient.
- Fix bug where
.gz
files were read and written uncompressed. - Fix nullness type of class
StringsPlume.NullableStringComparator
.
- Expand the contract of
CollectionsPlume.withoutDuplicates
. - Add
withoutDuplicatesComparable
which is more efficient.
- Fix problem with .jar file in previous release.
- New methods
CollectionsPlume.mapCapacity
to compute the size for a newly-allocated map. - New methods
hasDuplicates
inArraysPlume
andColletionsPlume
- Renamed methods (the old versions still work but are deprecated):
ArraysPlume.noDuplicates(List)
toColletionsPlume.noDuplicates
- Moved methods (the old versions still work but are deprecated):
UtilPlume.intersectionCardinality
andintersectionCardinalityAtLeast
toCollectionsPlume
- Expand the applicability of
CollectionsPlume.mapList
andtransform
- New methods for writing possibly-compressed files:
FilesPlume.newFileOutputStream
(3 overloads)FilesPlume.newFileWriter
(5 overloads)
- New methods:
ArraysPlume
:append
: creates a new array with an element added to the endnCopies
: produces an array that is multiple copies of a valuesameContents
: tests whether two arrays are the same, setwise
CollectionsPlume
:append
: creates a new list with an element added to the endconcatenate
: likeconcat
, but always returns a new listisSortedNoDuplicates
: tests whether a list is sorted and has no duplicatesisSorted
: tests whether a list is sortedlistOf
: likeList.of
in Java 9+transform
: likemapList
but with args in opposite order
StringsPlume
:charLiteral
: to quote a character as a Java character literalconjunction
: to produce text like "a, b, c, or d"
SystemPlume.getBooleanSystemProperty
: interpret a system property as a booleanUtilPlume.getBooleanProperty
interpret a property as a boolean
- Deprecated class:
StringsPlume.NullableStringComparator
(useComparator.nullsFirst(Comparator.naturalOrder())
)
- Deprecated
StringsPlume.escapeJava(char)
andStringsPlume.escapeJava(char)
; useescapeJava(String)
orcharLiteral()
- Renamed methods (the old versions still work but are deprecated):
UtilPlume.propertyIsTrue
togetBooleanProperty
CollectionsPlume.removeDuplicates
towithoutDuplicates
- Moved methods (the old versions still work but are deprecated):
- Moved file, directory, and stream methods from
UtilPlume
to new classFilesPlume
- Moved file, directory, and stream methods from
- New class:
LimitedSizeLongSet
- New methods:
StringsPlume.toStringAndClass(Object, boolean)
SystemPlume.gcPercentage
(two overloads)
- Deprecated methods:
UtilPlume.fileLines
(useFiles.readAllLines
)UtilPlume.hash
methods (useObjects.hash
orArrays.hashCode
)
- Moved methods (the old versions still work but are deprecated):
- Moved system methods from
UtilPlume
to new classSystemPlume
. - moved from
UtilPlume
toStringsPlume
:mapToStringAndClass
toStringAndClass
- Moved system methods from
- Removed classes that were deprecated in 2018, over 2 years ago:
ReflectionPlume
: useorg.plumelib.reflection.ReflectionPlume
insteadStringBuilderDelimited
: use the JDK'sStringJoiner
instead
- New class
ToStringComparator
compares two objects according to the result oftoString
- New methods:
UtilPlume.usedMemory
with no formal parameterUtilPlume.mapList
- Moved string methods from
UtilPlume
to new classStringsPlume
; the old versions still work but are deprecated.
- New methods:
UtilPlume.toStringAndClass
UtilPlume.mapToStringAndClass
UtilPlume.gc
UtilPlume.usedMemory
- Remove field
UniqueId.nextUid
- New class
UniqueIdMap
- New methods:
UtilPlume.replacePrefix
UtilPlume.replaceSuffix
- New interface
UniqueId
for objects that have a unique ID. - New methods:
UtilPlume.sleep
UtilPlume.countFormatArguments
UtilPlume.prefixLines
UtilPlume.prefixLinesExceptFirst
UtilPlume.indentLines
UtilPlume.indentLinesExceptFirst
Expand types of join() methods that take an Iterator.
Support Unicode escaping and unescaping, improve octal unescaping.
Added CombinationIterator class.
- Switched the order of the arguments to UtilPlume.join()
- Made UtilPlume.join generic, so it handles more types of arguments
- Renamings:
- UtilPlume.backTrace() to stackTraceToString()
- UtilPlume.escapeNonJava() to escapeJava()
- UtilPlume.unescapeNonJava() to unescapeJava()
- Added char versions of escapeJava and unescapeJava
The old versions of all methods continue to work, but are deprecated.
- No user-visible changes
- Fix visibility of DumpHeap methods
- Add DumpHeap class, for creating a .hprof file of the current heap.
- Update dependencies.
- No user-visible changes.
- Add ImmutableTypes class
- Add FileWriterWithName class
- Deprecate ReflectionPlume class in favor of org.plumelib.reflection.ReflectionPlume
- Documentation improvements
- Deprecate StringBuilderDelimited; clients should use StringJoiner instead
- Require Java 8
- Add version of
incrementMap
with an implicit count of 1 - Improve documentation, and eliminate
_
from identifier names - Remove unnecessary command-line arguments