package view; import java.awt.Color; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.commons.collections15.Transformer; public class VertexPaintTransformer implements Transformer{ Collection cluster; public VertexPaintTransformer(Collection cluster){ this.cluster = cluster; } public Paint transform(V node) { if(cluster.contains(node)) return (Paint) Color.GREEN; else return (Paint) Color.RED; } }