2 * Copyright (C) 2017 The SyPet Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package edu.utexas.sypet.synthesis.model;
18 import java.util.HashMap;
19 import java.util.LinkedHashSet;
29 public void setId(int id) {
33 public String getType() {
37 public void setType(String type) {
41 public String getName() {
45 public void setName(String name) {
49 public Set<JNode> getSuccessors() {
53 public Set<JNode> getPreds() {
57 public void addSuccessor(JNode s) {
61 public void addPred(JNode s) {
65 public void addSuccessor(JNode s, JEdge e) {
66 outgoingEdges.put(s, e);
70 public JEdge getOutgoingEdges(JNode s) {
71 return outgoingEdges.get(s);
74 public String toString() {
80 protected String type;
82 protected String name;
84 protected Map<JNode, JEdge> outgoingEdges = new HashMap<>();
86 protected Set<JNode> successors = new LinkedHashSet<>();
88 protected Set<JNode> preds = new LinkedHashSet<>();