/** * takes a CBlock and calls the block once for each ome.model.acquisition.LightSettings while * collecting the results. If <code>block == null</code>, then the * iterator values themselves are collected. This method uses * {@link #iterateLightSourceSettings} internally and so will return a value * even if the underlying collection is null. */ @SuppressWarnings("unchecked") public <E> java.util.List<E> collectLightSourceSettings(ome.util.CBlock<E> block) { if (! _loaded ) errorIfUnloaded(); java.util.List<E> result = new java.util.ArrayList<E>(); java.util.Iterator<ome.model.acquisition.LightSettings> it = iterateLightSourceSettings(); while ( it.hasNext() ) { IObject obj = (IObject) it.next(); if ( block != null ) { result.add( block.call( obj ) ); } else { result.add( (E) obj ); } } return result; }
/** * clears the set. */ public void clearLightSourceSettings() { if (! _loaded ) errorIfUnloaded(); if (getLightSourceSettings() == null) { throwNullCollectionException("LightSourceSettings"); } getLightSourceSettings().clear(); java.util.Iterator<ome.model.acquisition.LightSettings> it = iterateLightSourceSettings(); while (it.hasNext()) { ome.model.acquisition.LightSettings target = it.next(); target.setMicrobeamManipulation ( null ); } }