API Reference: Interfaces
Bifurcan defines its own set of collection interfaces to provide functional semantics and a richer API than the standard java.util collections. All collections, both linear (mutable) and forked (immutable), implement these interfaces.
Core Interfaces
-
ICollection: The base interface for all collections, defining common methods like
size(),linear(),forked(), andsplit(). -
IList: The interface for ordered sequences of elements. Provides methods for adding/removing from both ends (
addFirst,removeLast), random access (nth), and efficient slicing and concatenation. -
IMap: The interface for key-value associations. Defines methods like
put(),remove(),get(), and provides access to keys and values. It also has a sub-interface, ISortedMap, for maps that maintain key order. -
ISet: The interface for collections of unique elements. It offers standard set operations like
union(),difference(), andintersection. It also has a sub-interface, ISortedSet, for sets that maintain element order. -
IGraph: The interface for graph structures, defining operations for adding/removing vertices and edges (
link,unlink), and querying connectivity (in,out).