T - the configuration data type returned by this Sourcepublic abstract class AbstractSource<T> extends Object implements Source<T>
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one.
|
int |
hashCode() |
Optional<T> |
load(Mapper<T> mapper,
boolean optional)
Applies a specific configuration loading strategy and returns an
Optional,
possibly containing the retrieved data. |
String |
toString() |
public Optional<T> load(Mapper<T> mapper, boolean optional)
SourceOptional,
possibly containing the retrieved data. If the optional parameter is
true and the operation fails, then Optional.empty() is returned.load in interface Source<T>mapper - the Mapper to be applied on the source input streamoptional - a flag indicating whether or not an exception should be thrown in an
event of failure to load the configuration sourceoptional flag set as truepublic boolean equals(Object other)
Two Source objects can be considered equal if both share the same
implementation and parameter/path.
Copyright © 2021. All rights reserved.