Class ConstantDirectionalEdgeValueTransformer<V,E>
java.lang.Object
edu.uci.ics.jung.visualization.decorators.ConstantDirectionalEdgeValueTransformer<V,E>
- All Implemented Interfaces:
com.google.common.base.Function<Context<Graph<V,
,E>, E>, Number> Function<Context<Graph<V,
E>, E>, Number>
- Direct Known Subclasses:
EdgeLabelDemo.MutableDirectionalEdgeValue
public class ConstantDirectionalEdgeValueTransformer<V,E>
extends Object
implements com.google.common.base.Function<Context<Graph<V,E>,E>,Number>
Returns the constructor-specified value for each edge type.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDirectedValue
(double value) Sets the value returned for directed edges tovalue
.void
setUndirectedValue
(double value) Sets the value returned for undirected edges tovalue
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
undirected_value
-
directed_value
-
-
Constructor Details
-
ConstantDirectionalEdgeValueTransformer
public ConstantDirectionalEdgeValueTransformer(double undirected, double directed) - Parameters:
undirected
- the value to return if the edge is undirecteddirected
- the value to return if the edge is directed
-
-
Method Details
-
apply
-
setUndirectedValue
public void setUndirectedValue(double value) Sets the value returned for undirected edges tovalue
.- Parameters:
value
- the new value to return for undirected edges
-
setDirectedValue
public void setDirectedValue(double value) Sets the value returned for directed edges tovalue
.- Parameters:
value
- the new value to return for directed edges
-