Top Description Interfaces Annotations Classes
[default module]

Package com.google.common.graph

Annotations
@CheckReturnValue
@ParametersAreNonnullByDefault
Imports
com.google.errorprone.annotations.CheckReturnValue, javax.annotation.ParametersAreNonnullByDefault

An API for representing graph (node and edge) data. It is analogous to the Java Collections Framework APIs for lists, maps, sets, etc.

This package is a part of the open-source Guava library.

Interface Summary

Modifier and TypeInterface and Description
pack-priv interface
BaseGraph<
Node parameter type
N
>

A non-public interface for the methods shared between Graph and ValueGraph.

public interface
Graph<
Node parameter type
N
>

An interface for graph-structured data, whose edges are anonymous entities with no identity or information of their own.

pack-priv interface
GraphConnections<
Node parameter type
N
,
Value parameter type
V
>

An interface for representing and manipulating an origin node's adjacent nodes and edge values in a Graph.

public interface
MutableGraph<
Node parameter type
N
>

A subinterface of Graph which adds mutation methods.

public interface
MutableNetwork<
Node parameter type
N
,
Edge parameter type
E
>

A subinterface of Network which adds mutation methods.

public interface
MutableValueGraph<
Node parameter type
N
,
Value parameter type
V
>

A subinterface of ValueGraph which adds mutation methods.

public interface
Network<
Node parameter type
N
,
Edge parameter type
E
>

An interface for graph-structured data, whose edges are unique objects.

pack-priv interface
NetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

An interface for representing and manipulating an origin node's adjacent nodes and incident edges in a Network.

public interface
PredecessorsFunction<
Node parameter type
N
>

A functional interface for graph-structured data.

public interface
SuccessorsFunction<
Node parameter type
N
>

A functional interface for graph-structured data.

public interface
ValueGraph<
Node parameter type
N
,
Value parameter type
V
>

An interface for graph-structured data, whose edges have associated non-unique values.

Annotation Summary

Modifier and TypeAnnotation and Description
pack-priv @interface
ElementTypesAreNonnullByDefault

Marks all "top-level" types as non-null in a way that is recognized by Kotlin.

pack-priv @interface
ParametricNullness

Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractBaseGraph<
Node parameter type
N
>

This class provides a skeletal implementation of BaseGraph.

pack-priv abstract class
AbstractDirectedNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

A base implementation of NetworkConnections for directed networks.

public abstract class
AbstractGraph<
Node parameter type
N
>

This class provides a skeletal implementation of Graph.

pack-priv abstract class
AbstractGraphBuilder<N>

A base class for builders that construct graphs with user-defined properties.

public abstract class
AbstractNetwork<
Node parameter type
N
,
Edge parameter type
E
>

This class provides a skeletal implementation of Network.

pack-priv abstract class
AbstractUndirectedNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

A base implementation of NetworkConnections for undirected networks.

public abstract class
AbstractValueGraph<
Node parameter type
N
,
Value parameter type
V
>

This class provides a skeletal implementation of ValueGraph.

pack-priv class
DirectedGraphConnections<
Node parameter type
N
,
Value parameter type
V
>

An implementation of GraphConnections for directed graphs.

pack-priv class
DirectedMultiNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

An implementation of NetworkConnections for directed networks with parallel edges.

pack-priv class
DirectedNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

An implementation of NetworkConnections for directed networks.

pack-priv class
EdgesConnecting<
Edge parameter type
E
>

A class to represent the set of edges connecting an (implicit) origin node to a target node.

public class
ElementOrder<T>

Used to represent the order of elements in a data structure that supports different options for iteration order guarantees.

public abstract class
EndpointPair<N>

An immutable pair representing the two endpoints of an edge in a graph.

pack-priv abstract class
EndpointPairIterator<N>

A class to facilitate the set returned by Graph#edges().

pack-priv abstract class
ForwardingGraph<N>

A class to allow Graph implementations to be backed by a BaseGraph.

pack-priv abstract class
ForwardingNetwork<N, E>

A class to allow Network implementations to be backed by a provided delegate.

pack-priv abstract class
ForwardingValueGraph<N, V>

A class to allow ValueGraph implementations to be backed by a provided delegate.

public class
GraphBuilder<
The most general node type this builder will support. This is normally Object unless it is constrained by using a method like nodeOrder, or the builder is constructed based on an existing Graph using from(Graph).
N
>

A builder for constructing instances of MutableGraph or ImmutableGraph with user-defined properties.

pack-priv class
GraphConstants

A utility class to hold various constants used by the Guava Graph library.

public class
Graphs

Static utility methods for Graph, ValueGraph, and Network instances.

public class
ImmutableGraph<
Node parameter type
N
>

A Graph whose elements and structural relationships will never change.

public class
ImmutableNetwork<
Node parameter type
N
,
Edge parameter type
E
>

A Network whose elements and structural relationships will never change.

public class
ImmutableValueGraph<
Node parameter type
N
,
Value parameter type
V
>

A ValueGraph whose elements and structural relationships will never change.

pack-priv abstract class
IncidentEdgeSet<N>

Abstract base class for an incident edges set that allows different implementations of AbstractSet#iterator().

pack-priv class
MapIteratorCache<K, V>

A map-like data structure that wraps a backing map and caches values while iterating through unmodifiableKeySet().

pack-priv class
MapRetrievalCache<K, V>

A MapIteratorCache that adds additional caching.

pack-priv abstract class
MultiEdgesConnecting<
Edge parameter type
E
>

A class to represent the set of edges connecting an (implicit) origin node to a target node.

public class
NetworkBuilder<
The most general node type this builder will support. This is normally Object unless it is constrained by using a method like nodeOrder, or the builder is constructed based on an existing Network using from(Network).
N
,
The most general edge type this builder will support. This is normally Object unless it is constrained by using a method like edgeOrder, or the builder is constructed based on an existing Network using from(Network).
E
>

A builder for constructing instances of MutableNetwork or ImmutableNetwork with user-defined properties.

pack-priv class
StandardMutableGraph<
Node parameter type
N
>

Standard implementation of MutableGraph that supports both directed and undirected graphs.

pack-priv class
StandardMutableNetwork<
Node parameter type
N
,
Edge parameter type
E
>

Standard implementation of MutableNetwork that supports both directed and undirected graphs.

pack-priv class
StandardMutableValueGraph<
Node parameter type
N
,
Value parameter type
V
>

Standard implementation of MutableValueGraph that supports both directed and undirected graphs.

pack-priv class
StandardNetwork<
Node parameter type
N
,
Edge parameter type
E
>

Standard implementation of Network that supports the options supplied by NetworkBuilder.

pack-priv class
StandardValueGraph<
Node parameter type
N
,
Value parameter type
V
>

Standard implementation of ValueGraph that supports the options supplied by AbstractGraphBuilder.

public abstract class
Traverser<
Node parameter type
N
>

An object that can traverse the nodes that are reachable from a specified (set of) start node(s) using a specified SuccessorsFunction.

pack-priv class
UndirectedGraphConnections<
Node parameter type
N
,
Value parameter type
V
>

An implementation of GraphConnections for undirected graphs.

pack-priv class
UndirectedMultiNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

An implementation of NetworkConnections for undirected networks with parallel edges.

pack-priv class
UndirectedNetworkConnections<
Node parameter type
N
,
Edge parameter type
E
>

An implementation of NetworkConnections for undirected networks.

public class
ValueGraphBuilder<
The most general node type this builder will support. This is normally Object unless it is constrained by using a method like nodeOrder, or the builder is constructed based on an existing ValueGraph using from(ValueGraph).
N
,
The most general value type this builder will support. This is normally Object unless the builder is constructed based on an existing Graph using from(ValueGraph).
V
>

A builder for constructing instances of MutableValueGraph or ImmutableValueGraph with user-defined properties.