mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 14:59:25 +00:00
added command sample
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.iluwatar;
|
||||
|
||||
public enum Visibility {
|
||||
|
||||
VISIBLE,
|
||||
INVISIBLE;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
String s = "";
|
||||
|
||||
switch (this) {
|
||||
case INVISIBLE:
|
||||
s = "invisible";
|
||||
break;
|
||||
case VISIBLE:
|
||||
s = "visible";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user