Immutable Collections for Java is a library providing immutable/persistent collection classes for Java. While collections are immutable, they provide methods for adding and removing values by creating new modified copies of themselves. Each copy shares almost all of its structure with other copies, to minimize memory consumption. The library includes a singly-linked (cons/cddr style) list/stack, an integer tree-based indexed list, a 2-3 tree-based random access indexed list, a 2-3 tree-based map, a hash tree-based map, and hash- and tree-based sets. All collections provide immutable Cursor as well as standard Iterator classes for looping through all elements. A utility class provides functional style algorithmic processing of Cursors, including foldLeft, foldRight, collect, select, and reject. The 2-3 tree and integer tree classes are optimized for performance and can be used alongside java.util Collections when immutability is needed for safe data sharing.
PHP Text Diff Highlight class can find and view the difference between text strings. It takes two text strings and uses the diff algorithm to find the differences between them and return a list of changes to patch the original string to become the final string. The patch list shows what text should be added or removed to change one string into the other. The difference between the text strings may be computed in three modes: by character, by word, or by line. The class may also format the strings to view them as HTML, showing which characters are added and removed with special insertion and deletion styles. The example page works as a tool to interactively view the changes as the user changes the texts before and after the changes are applied.