dsmiley commented on code in PR #2932: URL: https://github.com/apache/solr/pull/2932#discussion_r1911438449
########## solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java: ########## @@ -67,4 +69,42 @@ public SimpleOrderedMap<T> clone() { newList.addAll(nvPairs); return new SimpleOrderedMap<>(newList); } + + /** + * Returns a shared, empty, and immutable instance of SimpleOrderedMap. + * @return empty SimpleOrderedMap (immutable) + */ + public static SimpleOrderedMap<Object> of() { + return EMPTY; + } + + /** + * Returns an immutable instance of SimpleOrderedMap with a single element. + * @return List containing the elements + */ + public static SimpleOrderedMap<Object> of(Object o1) { + return new SimpleOrderedMap<>(List.of(o1)); + } + + /** + * Returns an immutable instance of SimpleOrderedMap with two elements. + * @return List containing the elements + */ + public static SimpleOrderedMap<Object> of(Object o1, Object o2) { Review Comment: Basically, if Map has it, we can to. Any way, I also think we shouldn't over-invest in SimpleOrderedMap without callers of these methods. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org