class GiantComponentFilter implements NodeFilter {

        private static final String GIANT_COMPONENT_FILTER = "giantcomponent";

        private int componentId;
        private Column column;

        public GiantComponentFilter() {
        }

        @Override
        public boolean init(Graph graph) {
            ConnectedComponents cc = new ConnectedComponents();
            UndirectedGraph undirectedGraph = graph.getModel().getUndirectedGraph(graph.getView());

            column = graph.getModel().getNodeTable().getColumn(GIANT_COMPONENT_FILTER);
            if (column == null) {
                column = graph.getModel().getNodeTable().addColumn(GIANT_COMPONENT_FILTER, Integer.class);
            }
            graph.readLock();
            try {
                cc.weaklyConnected(undirectedGraph, column);
            } finally {
                graph.readUnlock();
            }
            componentId = cc.getGiantComponent();

            return column != null && componentId != -1;
        }

        @Override
        public boolean evaluate(Graph graph, Node node) {<FILL_FUNCTION_BODY>}

        @Override
        public void finish() {
            column.getTable().removeColumn(column);
        }

        @Override
        public String getName() {
            return NbBundle.getMessage(GiantComponentBuilder.class, "GiantComponentBuilder.name");
        }

        @Override
        public FilterProperty[] getProperties() {
            return new FilterProperty[0];
        }
    }

            Integer component = (Integer) node.getAttribute(column);
            if (component != null) {
                return component.equals(componentId);
            }
            return false;
        
<no_super_class>