Your version of ConstantTransformer takes only one parameter, the first being Object. This makes certain correct uses of it uncompilable. It should simply specify to be of ConstantTransformer<I, O>, and do nothing with O.
Example of problematic code:
renderContext.setEdgeShapeTransformer(new ConstantTransformer<Shape>(myShape));
The method setEdgeShapeTransformer(Transformer<Context<Graph<SerialTree.SerialNode,Number>,Number>,Shape>) in the type RenderContext<SerialTree.SerialNode,Number> is not applicable for the arguments (ConstantTransformer<Shape>)
Where renderContext is a RenderContext from the JUNG graphics library. The relevant function has this signature:
void setEdgeShapeTransformer(Transformer<Context<Graph<V,E>,E>,Shape> edgeShapeTransformer);