Class ImmutableSequentialGraph

java.lang.Object
it.unimi.dsi.webgraph.ImmutableGraph
it.unimi.dsi.webgraph.ImmutableSequentialGraph
All Implemented Interfaces:
FlyweightPrototype<ImmutableGraph>
Direct Known Subclasses:
ArcListASCIIGraph, ASCIIGraph, ErdosRenyiGraph, IncrementalImmutableSequentialGraph, IntegerListImmutableGraph, ScatteredArcsASCIIGraph, Transform.BatchGraph

public abstract class ImmutableSequentialGraph
extends ImmutableGraph
An abstract immutable graph that throws an UnsupportedOperationException on all random-access methods.

The main purpose of this class is to be used as a base for the numerous anonymous classes that do not support random access. Note that we override ImmutableGraph's implementation of nodeIterator(int): here we just call ImmutableGraph.nodeIterator() and skip to the desired node. This makes nodeIterator() and nodeIterator(0) equivalent, which is usually what you want.