Tapan Vaishnav commented on SOLR-11913:

>From whatever I understood(Apologies if I'm heavily wrong, just started using 
public Iterator<Map.Entry<String, String[]>> Iterable(SolrParams params){
    vals = new LinkedHashMap<>();
    if( params != null ) {
      this.add( params );
    Iterator<Map.Entry<String, String[]>> entries = vals.entrySet().iterator();
    return entries;

  public String[] getValue(Iterator<Map.Entry<String, String[]>> it){

    if (it.hasNext()) {
      Map.Entry<String, String[]> pair = it.next();
      return getParams(pair.getKey());
    return null;

> SolrParams ought to implement Iterable<Map.Entry<String,String[]>>
> ------------------------------------------------------------------
>                 Key: SOLR-11913
>                 URL: https://issues.apache.org/jira/browse/SOLR-11913
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Priority: Minor
>              Labels: newdev
> SolrJ ought to implement {{Iterable<Map.Entry<String,String[]>>}} so that 
> it's easier to iterate on it, either using Java 5 for-each style, or Java 8 
> streams.  The implementation on ModifiableSolrParams can delegate through to 
> the underlying LinkedHashMap entry set.  The default impl can produce a 
> Map.Entry with a getValue that calls through to getParams.  

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to