Skip to content

Commit 2cb110a

Browse files
committed
readme file update
1 parent 14506f5 commit 2cb110a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The JImmutable Collections library provides a useful set of immutable/persistent
44

55
Immutability and persistence are terms which people tend to interpret in different ways. The JImmutable classes are immutable in the sense that once a given collection has been created it cannot be modified. This means that it can be safely shared throughout a program without the need for synchronization or defensive copying.
66

7-
However the collections are designed to allow themselves to be easily updated as well. Each collection provides methods for adding and removing elements. Each of these methods creates a new collection of the same type while leaving the original collection intact (i.e. the original persists). The data structures used to implement the collections (linked lists, 2-3 trees, b-trees, and integer tries) allow for almost all of the structure of the original collection to be shared by the new collection. Since all objects within each collection are immutable this sharing is completely safe. The collections are persistent in the functional programming sense. The collections are **not** persistent in the database sense. All contents are stored in memory at all times.
7+
However the collections are designed to allow themselves to be easily updated as well. Each collection provides methods for adding and removing elements. Each of these methods creates a new collection of the same type while leaving the original collection intact (i.e. the original persists). The data structures used to implement the collections (linked lists, b-trees, and integer tries) allow for almost all of the structure of the original collection to be shared by the new collection. Since all objects within each collection are immutable this sharing is completely safe. The collections are persistent in the functional programming sense. The collections are **not** persistent in the database sense. All contents are stored in memory at all times.
88

99
Each collection class provides adapter methods to create java.util style unmodifiable collections backed by the immutable collection. Unlike the [Guava](https://github.com/google/guava) immutable collection classes these adapters do not create defensive copies of all elements from the original collections. They simply access elements within the original collection. If you have code that needs a java.util.Map to do its work you can still use a JImmutables.map() and simply call it's getMap() method when you need to pass a java.util.Map to your older code.
1010

0 commit comments

Comments
 (0)