X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api%2Fsrc%2Forg%2Fargeo%2Fapi%2Fgcr%2FAttributeFormatter.java;fp=org.argeo.api%2Fsrc%2Forg%2Fargeo%2Fapi%2Fgcr%2FAttributeFormatter.java;h=0000000000000000000000000000000000000000;hb=7d2a002f5dcfe8a8c7b29803b70d4b1aff265ed1;hp=a628cda783e6c5bee5f60f099d9e0264adffbec3;hpb=865fc51900459b888938cc0d6943673ee6f20d09;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.api/src/org/argeo/api/gcr/AttributeFormatter.java b/org.argeo.api/src/org/argeo/api/gcr/AttributeFormatter.java deleted file mode 100644 index a628cda78..000000000 --- a/org.argeo.api/src/org/argeo/api/gcr/AttributeFormatter.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.argeo.api.gcr; - -/** - * An attribute type MUST consistently parse a string to an object so that - * parse(obj.toString()).equals(obj) is verified. - * {@link #format(Object)} can be overridden to provide more efficient - * implementations but the returned - * String MUST be the same, that is format(obj).equals(obj.toString()) - * is verified. - */ -public interface AttributeFormatter { - /** Parses a String to a Java object. */ - T parse(String str) throws IllegalArgumentException; - - /** Default implementation returns {@link Object#toString()} on the argument. */ - default String format(T obj) { - return obj.toString(); - } -}