#355 document, abstract base, traits and example domain
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
package com.iluwatar.abstractdocument.domain;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.iluwatar.abstractdocument.Document;
|
||||
|
||||
public interface HasPrice extends Document {
|
||||
|
||||
default Optional<Number> getPartner() {
|
||||
return Optional.ofNullable((Number) get("price"));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user