- java.lang.Object
-
- org.jgrapht.graph.DefaultEdgeFunction<E,T>
-
- Type Parameters:
E- the edge typeT- the value type
- All Implemented Interfaces:
Serializable,Function<E,T>
public class DefaultEdgeFunction<E,T> extends Object implements Function<E,T>, Serializable
Default implementation of an edge function which uses a map to store values.- Author:
- Dimitrios Michail
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultEdgeFunction(T defaultValue)Create a new functionDefaultEdgeFunction(T defaultValue, Map<E,T> map)Create a new function
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tapply(E e)Get the function value for an edge.Tget(E e)Get the function value for an edge.voidset(E e, T value)Set the function value for an edge.
-
-
-
Constructor Detail
-
DefaultEdgeFunction
public DefaultEdgeFunction(T defaultValue)
Create a new function- Parameters:
defaultValue- the default value- Throws:
NullPointerException- if argument isnull
-
DefaultEdgeFunction
public DefaultEdgeFunction(T defaultValue, Map<E,T> map)
Create a new function- Parameters:
defaultValue- the default valuemap- the underlying map- Throws:
NullPointerException- if either one of the arguments isnull
-
-