Skip to content
A simple utility to intern Java objects
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

intern

This library implements the InternPool as described on the page javax0 article. It is capable interning objects. Interned objects in a pool are represented with a single instance when they are equal. Thus

   a = pool.intern(a)
   b = pool.intern(b)

will become a == b if a.equals(b) was true before interning even if a == b was not true before interning.

The library is thread safe.

<dependency>
  <groupId>com.javax0</groupId>
  <artifactId>intern</artifactId>
  <version>1.0.0</version>
</dependency>
You can’t perform that action at this time.