Skip to contentMethod: toString()
      1: package symbols;
2: 
3: import model.Position;
4: import scanner.ScannerConstants;
5: 
6: /**
7:  * 
8:  * This class represents the plussymbol (+).
9:  * 
10:  */
11: public final class PlusSymbol extends AbstractSymbol {
12: 
13:         /**
14:          * The constructor instantiate the plussymbol.
15:          * 
16:          * @param position
17:          *            is the row and column of the data in the stream.
18:          */
19:         public PlusSymbol(final Position position) {
20:                 super(position);
21:         }
22: 
23:         @Override
24:         public String toString() {
25:                 return ScannerConstants.PLUS.toString() + this.getPosition();
26:         }
27: 
28:         @Override
29:         public int hashCode() {
30:                 return super.hashCode();
31:         }
32: 
33:         @Override
34:         public boolean equals(final Object obj) {
35:                 return super.equals(obj) && obj instanceof PlusSymbol;
36:         }
37: 
38: }