forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTarget.java
More file actions
38 lines (29 loc) · 669 Bytes
/
Copy pathTarget.java
File metadata and controls
38 lines (29 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.iluwatar.command;
/**
*
* Base class for spell targets.
*
*/
public abstract class Target {
private Size size;
private Visibility visibility;
public Size getSize() {
return size;
}
public void setSize(Size size) {
this.size = size;
}
public Visibility getVisibility() {
return visibility;
}
public void setVisibility(Visibility visibility) {
this.visibility = visibility;
}
@Override
public abstract String toString();
public void printStatus() {
System.out.println(String.format("%s, [size=%s] [visibility=%s]", this,
getSize(), getVisibility()));
System.out.println();
}
}