#355 override toString to log properties
This commit is contained in:
@ -31,8 +31,19 @@ public abstract class AbstractDocument implements Document {
|
||||
return Stream.of(get(key))
|
||||
.filter(el -> el != null)
|
||||
.map(el -> (List<Map<String, Object>>) el)
|
||||
.findFirst().get().stream()
|
||||
.findAny().get().stream()
|
||||
.map(constructor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
builder.append(getClass().getName()).append("[");
|
||||
properties.entrySet().forEach(e ->
|
||||
builder.append("[").append(e.getKey()).append(" : ").append(e.getValue()).append("]")
|
||||
);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user