class EdgeTypeFilter extends AbstractFilter implements EdgeFilter {

        private final GraphModel graphModel;
        private Integer type;

        public EdgeTypeFilter(GraphModel graphModel) {
            super(NbBundle.getMessage(EdgeTypeBuilder.class, "EdgeTypeBuilder.name"));
            this.graphModel = graphModel;

            addProperty(Integer.class, "type");
        }

        @Override
        public boolean init(Graph graph) {
            return true;
        }

        @Override
        public boolean evaluate(Graph graph, Edge edge) {
            return Objects.equals(type, edge.getType());
        }

        @Override
        public void finish() {
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public Collection getEdgeTypeLabels() {
            Graph graph = graphModel.getGraph();
            Object[] labels = graphModel.getEdgeTypeLabels();
            ArrayList<Object> col = new ArrayList<>(labels.length);
            for (Object l : labels) {
                if (graph.getEdgeCount(graphModel.getEdgeType(l)) > 0) {
                    col.add(l);
                }
            }
            return col;
        }

        public void setEdgeTypeLabel(Object obj) {<FILL_FUNCTION_BODY>}
    }

            int id = graphModel.getEdgeType(obj);
            if (id != -1) {
                getProperties()[0].setValue(id);
            }
        
<no_super_class>