Clarify ACR API
[lgpl/argeo-commons.git] / org.argeo.api.acr / src / org / argeo / api / acr / StructuredData.java
index 4e38cf62d0f8131ef33805dff95ccb4e90ee362a..770823222cb6d93fd615d0f6841753e9fcb5c2e4 100644 (file)
@@ -4,5 +4,10 @@ import java.util.Map;
 
 /** A hierarchical structure of unnamed mappings. */
 public interface StructuredData<KEY, VALUE, CHILD> extends Map<KEY, VALUE>, Iterable<CHILD> {
-
+       /*
+        * DEFAULT METHODS
+        */
+       default <A> A adapt(Class<A> clss) {
+               throw new UnsupportedOperationException("Cannot adapt content " + this + " to " + clss.getName());
+       }
 }