Class ConstantDirectionalEdgeValueTransformer<V,​E>

  • All Implemented Interfaces:
    org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,​E>,​E>,​java.lang.Number>

    public class ConstantDirectionalEdgeValueTransformer<V,​E>
    extends java.lang.Object
    implements org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,​E>,​E>,​java.lang.Number>
    Returns the constructor-specified value for each edge type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setDirectedValue​(double value)
      Sets the value returned for directed edges to value.
      void setUndirectedValue​(double value)
      Sets the value returned for undirected edges to value.
      java.lang.Number transform​(edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,​E>,​E> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • undirected_value

        protected java.lang.Double undirected_value
      • directed_value

        protected java.lang.Double directed_value
    • Constructor Detail

      • ConstantDirectionalEdgeValueTransformer

        public ConstantDirectionalEdgeValueTransformer​(double undirected,
                                                       double directed)
        Parameters:
        undirected -
        directed -
    • Method Detail

      • transform

        public java.lang.Number transform​(edu.uci.ics.jung.graph.util.Context<edu.uci.ics.jung.graph.Graph<V,​E>,​E> context)
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<V,​E>
        See Also:
        Transformer.transform(Object)
      • setUndirectedValue

        public void setUndirectedValue​(double value)
        Sets the value returned for undirected edges to value.
        Parameters:
        value - the new value to return for undirected edges
      • setDirectedValue

        public void setDirectedValue​(double value)
        Sets the value returned for directed edges to value.
        Parameters:
        value - the new value to return for directed edges