Skip to contentMethod: getPackage()
      1: package gui.wrapperobjects;
2: 
3: import model.Package;
4: 
5: /**
6:  * Wrapper class for packages.
7:  * 
8:  * @author Phil
9:  * 
10:  */
11: public class PackageWrapper implements TreeElement {
12:         /**
13:          * The package to wrap.
14:          */
15:         private final Package pkg;
16: 
17:         /**
18:          * The PackageWrapper constructor.
19:          * 
20:          * @param pkg
21:          *            The package to wrap.
22:          */
23:         public PackageWrapper(final Package pkg) {
24:                 this.pkg = pkg;
25:         }
26: 
27:         /**
28:          * @return the package.
29:          */
30:         public Package getPackage() {
31:                 return this.pkg;
32:         }
33: 
34:         @Override
35:         public String toString() {
36:                 return this.pkg.getName();
37:         }
38: 
39:         @Override
40:         public void accept(final TreeElementVisitor vis) {
41:                 vis.visit(this);
42:         }
43: }