(InstanceScope scope, List<Object> list, Object o)
| 940 | } |
| 941 | |
| 942 | protected void addToList(InstanceScope scope, List<Object> list, Object o) { |
| 943 | o = convertAnythingIteratableToIterator(scope, o); |
| 944 | if ( o instanceof Iterator) { |
| 945 | // copy of elements into our temp list |
| 946 | Iterator<?> it = (Iterator<?>)o; |
| 947 | while ( it.hasNext() ) list.add(it.next()); |
| 948 | } |
| 949 | else { |
| 950 | list.add(o); |
| 951 | } |
| 952 | } |
| 953 | |
| 954 | /** |
| 955 | * Return the first attribute if multi-valued, or the attribute itself if |
no test coverage detected