Skip navigation links

Package net.sf.saxon.ma.parray

This package contains an implementation of persistent immutable arrays.

See: Description

Package net.sf.saxon.ma.parray Description

This package contains an implementation of persistent immutable arrays.

("Persistent" seems to have acquired a new meaning. It no longer refers to values that outlive the execution of the program that created them, but now refers to data structures where modification actions leave the existing value unchanged.)

The first version of this package (released with Saxon 9.9.0.1) took code from the PCollections library at https://github.com/hrldcpr/pcollections. In 9.9.1.1 this has been replaced by a home-brew implementation written entirely by Saxonica.

The implementation uses a simple binary tree, in which the left-hand half of the array is in one subtree, and the right-hand half in the other. The tree is kept balanced as necessary. There are two special-case implementations for empty and singleton trees.

Skip navigation links

Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.