public interface ILinearizable<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
isLinear() |
T |
linear()
This represents a data structure which can be made linear, which is equivalent to Clojure's transient
data structures: only the most recent reference to the data structure should be used.
|
T linear()
addLast() on an IList), we should only refer to the object returned
by that method; anything else has undefined results.
The term "linear", as used here, does not completely align with the formal definition of linear types as used in type theory. It is meant to describe the linear dataflow of the method calls, and as a converse to "forked" data structures.
If the data structure is already linear, it will simply return itself.
boolean isLinear()