(InstanceScope scope, List<Object> list, Object o)
| 954 | } |
| 955 | |
| 956 | protected void addToList(InstanceScope scope, List<Object> list, Object o) { |
| 957 | o = convertAnythingIteratableToIterator(scope, o); |
| 958 | if ( o instanceof Iterator) { |
| 959 | // copy of elements into our temp list |
| 960 | Iterator<?> it = (Iterator<?>)o; |
| 961 | while ( it.hasNext() ) list.add(it.next()); |
| 962 | } |
| 963 | else { |
| 964 | list.add(o); |
| 965 | } |
| 966 | } |
| 967 | |
| 968 | /** |
| 969 | * Return the first attribute if multi-valued, or the attribute itself if |
no test coverage detected