[ 
https://issues.apache.org/jira/browse/SOLR-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611713#action_12611713
 ] 

[EMAIL PROTECTED] edited comment on SOLR-621 at 7/8/08 10:48 AM:
------------------------------------------------------------

Micro-optimization: since names will often be interned (constants), you could 
replace this code
{code}
+      if (name == null) {
+        if (n == null) {
+          result.add(getVal(i));
+        }
+      } else if (name.equals(n)) {
+        result.add(getVal(i));
+      }
{code}
with something like this:
{code}
+      if (name == n || (n!=null && n.equals(name)) {
+          result.add(getVal(i));
+        }
{code}

      was (Author: [EMAIL PROTECTED]):
    Micro-optimization: since names will often be interned (constants), you 
could replace this code

+      if (name == null) {
+        if (n == null) {
+          result.add(getVal(i));
+        }
+      } else if (name.equals(n)) {
+        result.add(getVal(i));
+      }

with something like this:

+      if (name == n || (n!=null && n.equals(name)) {
+          result.add(getVal(i));
+        }
  
> Add a getAll method to NamedList
> --------------------------------
>
>                 Key: SOLR-621
>                 URL: https://issues.apache.org/jira/browse/SOLR-621
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Noble Paul
>            Priority: Trivial
>         Attachments: SOLR-621.patch
>
>
> It would be convenient to have a 
> List<T> getAll(String name);
> method in NamedList

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to