joerghoh commented on code in PR #3:
URL:
https://github.com/apache/sling-org-apache-sling-resourcecollection/pull/3#discussion_r1126663245
##########
src/main/java/org/apache/sling/resource/collection/ResourceCollection.java:
##########
@@ -67,7 +68,16 @@ public interface ResourceCollection {
/**
* Returns additional properties for a particular resource in Collection
entry.
*
- * @return properties of the Collection entry as
<code>ModifiableValueMap</code>, returns null if entry found.
+ * @return properties of the Collection entry as the specified type,
returns empty if no entry found or
+ * the entry cannot be adapted to the type
+ */
+ <T> Optional<T> getPropertiesAs(Resource resource, Class<T> type);
Review Comment:
I wonder if we need that level of "generic" at this point here at all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]