All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.javagimmicks.graph.AbstractDefaultValuedEdge Maven / Gradle / Ivy

There is a newer version: 0.99-alpha1
Show newest version
package net.sf.javagimmicks.graph;

abstract class AbstractDefaultValuedEdge> extends
      AbstractDefaultEdge implements ValuedEdge
{
   protected ValueType _value;

   AbstractDefaultValuedEdge(final Graph graph, final VertexType source, final VertexType target, final ValueType value)
   {
      super(graph, source, target);

      setValue(value);
   }

   @Override
   public ValueType getValue()
   {
      return _value;
   }

   public void setValue(final ValueType value)
   {
      _value = value;
   }

   @Override
   public String toString()
   {
      final StringBuilder result = new StringBuilder(super.toString());
      if (_value != null)
      {
         result.append(": ").append(_value);
      }

      return result.toString();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy