Re: AW: [commons-lang3] NumberUtils feature

2018-01-01 Thread Javen O';Neal
I'm -1 for a static function as suggested by Lucas. It doesn't improve code readability, and I'd argue that it decreases readability because of needing to memorize operator order, ambiguous inclusivity of endpoints (unless you add isStrictlyBetween), and doesn't gracefully handle mixed data types,

Re: [lang][collections] SortedProperties

2017-07-18 Thread Javen O';Neal
+1 for Lang. There aren't any persistent data structures in Collections, nor would I think to look in Collections to find one. Properties is a persistent hashtable. SortedProperties is a persistent TreeMap. Unless you're thinking about a new family of SortedProperties. Were you thinking about le

Re: [collections] How about a HashBidiMap?

2017-07-06 Thread Javen O';Neal
s4/ > bidimap/DualHashBidiMap.java?view=markup > > "Commons Collections would welcome the addition of a direct hash-based > implementation of the BidiMap interface" > > Guess I was wrong. > > > From: Javen O'Neal > Sent:

Re: [collections] How about a HashBidiMap?

2017-07-06 Thread Javen O';Neal
How is this different from the existing DualHashBidiMap? https://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/bidimap/DualHashBidiMap.html On Jul 6, 2017 09:06, "Efremov, Rodion" wrote: > Hello, > > > I am working on a hash table based BidiM

Re: Pair of nulls

2017-05-10 Thread Javen O';Neal
+1 The of method should check if all elements are null, and if so to return the NULL singleton. This would reduce the number of objects created and garbage collected. So long as ImmutablePair and ImmutableTriple classes are final (not subclassable), then identity checking could be used in place o

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-24 Thread Javen O';Neal
extended ReadOnlySet/UnmodifiableSet, and that will probably never happen. On Mar 24, 2017 8:57 AM, "Lukasz Lenart" wrote: > 2017-03-23 16:55 GMT+01:00 Javen O'Neal : > > The best solution is to document where you return an UnmodifiableSet > versus > > a regular

Re: [Collections] UnmodifiableSet/UnmodifiableList

2017-03-23 Thread Javen O';Neal
Because either (1) UnmodifiableSet implents the Set interface and throws an Invalid operations working at runtime for methods that would modify the set or (2) UnmodifiableSet does not implement the full Set interface, making it possible to catch errors at compile time, but also making it impossible

Re: Best Home for Checksum Implementations?

2017-01-24 Thread Javen O';Neal
[Crypto] is another possible home since hashing and crypto are commonly used together, but a standalone component may be easier for other projects to use with regard to technology export control and easier for [Checksum] to grow without revving a more mature library like [Crypto]. On Jan 24, 2017

[collections] a list class with fast indexOf(Object) and contains(Object)

2016-09-11 Thread Javen O';Neal
On the Apache POI project (Java library to read and write Microsoft Office files), we are using a List to store the fonts (XSSFFont) used in an Excel workbook's style table (XSSFWorkbook.getStylesSource() -> StyleTable) [1]. To avoid bloating the style table with duplicate fonts, we check if the f