mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-11 22:13:34 +00:00
#355 document, abstract base, traits and example domain
This commit is contained in:
1 parent
c1187ae0d7
commit
913411773f
7 files changed
+147
No files matched your search
@@ -0,0 +1,13 @@
|
||||
package com.iluwatar.abstractdocument.domain;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.iluwatar.abstractdocument.Document;
|
||||
|
||||
public interface HasModel extends Document {
|
||||
|
||||
default Optional<String> getModel() {
|
||||
return Optional.ofNullable((String) get("model"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user