1 package org.lcsim.detector; 2 3 import java.util.List; 4 5 import org.lcsim.detector.identifier.IIdentifier; 6 7 /** 8 * DetectorElementContainer extends 9 * {@link java.util.List} and contains 0 10 * or more DetectorElements. It can be used 11 * to provide special behavior for collections 12 * of DetectorElements. 13 * 14 * @see DetectorElement 15 * @see IDetectorElement 16 * @see java.util.List 17 * @see java.util.ArrayList 18 * 19 * @author Jeremy McCormick 20 * @version $Id: IDetectorElementContainer.java,v 1.8 2007/05/25 20:16:26 jeremy Exp $ 21 */ 22 public interface IDetectorElementContainer 23 extends List<IDetectorElement> 24 { 25 /** 26 * Find an {@link IDetectorElement} by class. 27 * @param klass The class. 28 * @return A <code>List</code> of <code>DetectorElement</code> objects with matching class. 29 */ 30 public IDetectorElementContainer find(Class<? extends IDetectorElement> klass); 31 32 /** 33 * Find an {@link IDetectorElement} by name. 34 * 35 * @param name The name of the DetectorElement. 36 * @return The DetectorElement matching name or 37 * <code>null</code> if none exists. 38 */ 39 public IDetectorElementContainer find(String name); 40 41 /** 42 * Find an {@link IDetectorElement} by {@link IIdentifier}. 43 * 44 * @param id The id of the DetectorElement. 45 * @return The DetectorElement matching id or 46 * <code>null</code> if none exists. 47 */ 48 public IDetectorElementContainer find(IIdentifier id); 49 }