Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javolution Extended

Based on Javolution 5.5.1 source code, combined with rawnet/javolution.

Since version 5.4, upstream Javolution has marked most public classes and methods as final, preventing overriding. This project removes those restrictions and continues to develop and extend the library.

Changelog:

Since v5.7.8:
  • Updated README.md and Javadoc: Fixed several Javadoc layout issues and code block formatting across multiple packages (context, lang, io, xml, etc.).
  • Fixed the issue where FastList.newInstance() was missing a generic type parameter when compiling on Java 5+.
  • Added FastPrimitiveList and primitive iterators:
    • Introduced the abstract base class FastPrimitiveList and the FastPrimitiveIterator interface under javolution.util.primitive.
    • Added dedicated primitive iterator implementations (FastBooleanIterator, FastByteIterator, FastCharIterator, FastDoubleIterator, FastFloatIterator, FastIntIterator, FastLongIterator, FastShortIterator).
  • Enhanced primitive array lists (Fast<Type>ArrayList):
    • Implemented iterator(), reset(), and trimToSize() methods across all primitive array list classes.
    • Added support for unmodifiable() and shared() views along with their respective Unmodifiable and Shared inner classes.
  • Optimized Unmodifiable and Shared collection wrappers:
    • Added final modifiers to proxy methods in Unmodifiable and Shared inner classes for improved performance and lock consistency.
    • Standardized parameter names.
Since v5.7.7:
  • Updated README.md.
  • Removed AbstractList: Now, FastList and FastTable will directly extends FastCollection.
  • Removed javolution.util.ReentrantLock: Use javolution.util.concurrent.locks.ReentrantLock instead.
  • Removed the javolution.util.internal.collection package and its inner classes.
  • Reimplemented Unmodifiable and Shared for FastCollection, FastList, and FastTable.
  • The source code will now use the Java standard line width, reduced from 120 to 80 characters.
Since v5.7.6:
  • Updated README.md.
  • Renamed FastAbstractList to AbstractList.
  • Fixed an incorrect javac attribute name in the build.xml file.
  • Fixed several Javadoc layout issues.
  • Reimplemented the unmodifiable() and shared() methods for FastList and FastTable.
  • For SharedFastList and SharedFastTable:
    • Fixed the issue where subList() uses the wrong lock type, changing it from writeLock() to readLock().
    • Added thread-safe implementations for iterator(), listIterator(), and listIterator(int).
  • For Fast<Type>ArrayList in the javolution.util.primitive package:
    • Optimized parameter names for some methods.
    • If compiled in Java 5+, the toString() method will use the internal StringBuilder to improve performance.
    • Optimized the indexOf() and lastIndexOf() methods: They will return -1 if the list is empty.
  • Added PropertyChangeMulticaster.java and VetoableChangeMulticaster.java from Doug Lea's util.concurrent package in Release 1.3.4: However, due to the limitation of not having JavaBeans on J2ME, these two classes will have empty bodies by default (not implemented).
  • Changed the use of @exception to @throws in Javadoc.
  • The file jdk-1_5_0_22-linux-amd64-direct.bin has been renamed to jdk-5u22-linux-x64.bin in the lib/ directory.
Since v5.7.5:
  • Revert to using colapi.jar when building Javadoc.
  • Doug Lea's util.concurrent package in Release 1.3.4 has been implemented in javolution.util.concurrent, except for PropertyChangeMulticaster.java and VetoableChangeMulticaster.java for maintenance and backport reasons.
  • javolution.util.concurrent will be split into sub-packages similar to the JDK:
    • java.util.concurrent can be replaced with javolution.util.concurrent.
    • java.util.concurrent.atomic can be replaced with javolution.util.concurrent.atomic.
    • java.util.concurrent.locks can be replaced with javolution.util.concurrent.locks.
  • Added Javadoc for packages: javolution.util.concurrent, javolution.util.concurrent.atomic, javolution.util.concurrent.locks, javolution.util.internal.collection, and javolution.util.primitive.
  • Added an override for FastSet.shared().
  • Added an iterator method for FastSet.
  • Optimized javolution.util.concurrent.ConcurrentHashMap for high concurrency and low GC pressure:
    • Converted the internal chain links to a volatile Entry _next pointer to ensure safe lock-free reads.
    • Redesigned the removal logic to perform in-place unlinking (prev._next = e._next) under segment locks, completely eliminating the original Copy-on-Write chain replication overhead and achieving zero-allocation removals.
    • Added static newKeySet() and newKeySet(int) helper methods mimicking JDK 8+ concurrent set support.
    • Implemented the nested static class KeySetView to support concurrent, reusable Set views of map keys, fully backported for J2ME and legacy JDK (1.4+) compatibility.
Since v5.7.4:
  • Updated property names in build.xml.
  • Javadoc build will now use colapi-2.0.jar.
  • With the javolution.util.concurrent.locks package:
    • Changed the naming convention of classes in the package to be consistent with classes in other packages.
    • Added the ReaderPreferenceReadWriteLock class.
    • Renamed the ReentrantReadWriteLock class to ReentrantWriterPreferenceReadWriteLock to be consistent with Doug Lea's implementation.
    • Reformatted the Javadocs.
  • Reformatted the FastTable code.
  • Reformatted the FastList code.
Since v5.7.3:
  • Unified build output set to target/classes.
  • With FastTable:
    • The requireNotNull() method has been removed.
    • The isNullDisallowed() method has been removed.
    • If you want the table to not allow null values, use constructors that specify boolean rejectNulls such as: FastTable(boolean rejectNulls) or FastTable(int capacity, boolean rejectNulls) or FastTable(Collection values, boolean rejectNulls).
    • Updated Javadoc.
  • Updated README.md.
  • The new Javadoc page has been updated.
Since v5.7.2:
  • Optimized the FastTable source code.
  • For classes in the javolution.util.primitive package:
    • Classes have been renamed to the format Fast<Type>ArrayList.
    • The source code has been optimized.
    • It will now throw an ArrayIndexOutOfBoundsException instead of IndexOutOfBoundsException when attempting to access an invalid index position.
    • Renamed the delete() method to removeElement().
    • The removeRange() method has been removed.
Since v5.7.1:
  • Added the javolution.util.primitive package: A collection of implementations for FastList and FastMap for primitive data types.
  • Reimplemented for J2ME; when compiled with ant j2me, it will default to using midp_2.0.jar (MIDP 2.0) and cldc_1.1.jar (CLDC 1.1) for the classpath.
Since v5.7.0:
  • Added the packages javolution.util.concurrent and javolution.util.concurrent.locks based on Doug Lea's implementation.
  • The following classes have been renamed:
    • MutableListFastAbstractList.
    • SharedCollectionImplFastSharedCollection.
    • UnmodifiableCollectionImplFastUnmodifiableCollection.

From this version onwards, there will no longer be separate branches for each version. If you need to download the source code, please download it from the Releases page.

Since v5.6.9:
  • Undo class name FastSequence to FastList.
  • The abstract class FastList has been renamed to MutableList.
Since v5.6.8:
  • The original FastChain has been replaced with FastSequence.
Since v5.6.6:
  • The original FastList has been replaced with FastChain.

Suggestions for use:

  • ArrayList can be replaced with FastTable.
  • LinkedList can be replaced with FastList.
  • To initialize a FastTable / FastList:
FastTable table = new FastTable();
FastList list = new FastList();
// or:
FastCollection table = new FastTable();
FastCollection list = new FastList();

How to build:

This project supports building with Apache Ant™ and Apache Maven; please refer to the official websites for system requirements. However, to compile the source code and build the Javadoc, you will need Java 5 or Java 6, depending on your needs; see the build.xml file for details.

About

Based on Javolution 5.5.1 source code, combined with rawnet/javolution.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages