
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<V,Paint> implements Transformer<V,Paint>{

    Collection<V> cluster;

    public VertexPaintTransformer(Collection<V> cluster){
        this.cluster = cluster;
    }

    public Paint transform(V node) {
      if(cluster.contains(node)){
         Color c = new Color(0,255,0);
         return (Paint) c;
      }
      else
         return (Paint) Color.RED;
     }


}
