Skip to content

Instantly share code, notes, and snippets.

@libliboom
Last active November 1, 2019 09:57
Show Gist options
  • Save libliboom/29d59df97f948455a648f21ad70e0c78 to your computer and use it in GitHub Desktop.
Save libliboom/29d59df97f948455a648f21ad70e0c78 to your computer and use it in GitHub Desktop.
// 가변 상태를 키로하고 값을 데이터로 하는 맵의 예제
class FlexibleObject {
/*package*/ Map<String, Object> properties = new HashMap<String, Object>();
/*package*/ Object getProperty(String key) {
return properties.get(key);
}
/*package*/ void setProperty(String key, Objecct value) {
properties.set(key, value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment