class KCoreFilter implements ComplexFilter {

        private FilterProperty[] filterProperties;
        private Integer k = 1;

        @Override
        public Graph filter(Graph graph) {
            int removed = 0;
            do {
                removed = 0;
                for (Node n : graph.getNodes().toArray()) {
                    if (graph.getDegree(n) < k) {
                        graph.removeNode(n);
                        removed++;
                    }
                }
            } while (removed > 0);
            return graph;
        }

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

        @Override
        public FilterProperty[] getProperties() {<FILL_FUNCTION_BODY>}

        public Integer getK() {
            return k;
        }

        public void setK(Integer k) {
            this.k = k;
        }
    }

            if (filterProperties == null) {
                filterProperties = new FilterProperty[0];
                try {
                    filterProperties = new FilterProperty[] {
                        FilterProperty.createProperty(this, Integer.class, "k"),};
                } catch (Exception ex) {
                    Exceptions.printStackTrace(ex);
                }
            }
            return filterProperties;
        
<no_super_class>