-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/model/Source.java
- Loading branch information
Showing
5 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
package model; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class Branch { | ||
protected final String name; | ||
protected Node nodeP; | ||
protected Node nodeN; | ||
private Branch superiorBranch; | ||
private ArrayList<Branch> subBranches = new ArrayList<>(); | ||
private int width; | ||
private int height; | ||
|
||
public Branch(String name, Node nodeP, Node nodeN) { | ||
this.name = name; | ||
this.nodeP = nodeP; | ||
this.nodeN = nodeN; | ||
} | ||
this.superiorBranch = null; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
|
||
public void setWidth(int width) { this.width = width; } | ||
|
||
public void setHeight(int height) { this.height = height; } | ||
|
||
public void setSuperiorBranch(Branch superiorBranch) { this.superiorBranch = superiorBranch; } | ||
|
||
public void setSubBranches(ArrayList<Branch> subBranches) { this.subBranches = subBranches; } | ||
|
||
public ArrayList<Branch> getSubBranches() { return subBranches; } | ||
|
||
public Branch getSuperiorBranch() { return superiorBranch; } | ||
|
||
public String getName() { return name; } | ||
|
||
public int getWidth() { return width; } | ||
|
||
public int getHeight() { return height; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters