1 17 package org.apache.excalibur.source.impl.validity; 18 19 import java.util.ArrayList ; 20 import java.util.Collections ; 21 import java.util.Iterator ; 22 import java.util.List ; 23 24 import org.apache.excalibur.source.SourceValidity; 25 26 32 public abstract class AbstractAggregatedValidity 33 implements SourceValidity 34 { 35 final ArrayList m_list = new ArrayList (); 36 37 public void add( final SourceValidity validity ) 38 { 39 m_list.add( validity ); 40 } 41 42 public String toString() 43 { 44 final StringBuffer sb = new StringBuffer ( "SourceValidity " ); 45 for( final Iterator i = m_list.iterator(); i.hasNext(); ) 46 { 47 sb.append( i.next() ); 48 if( i.hasNext() ) sb.append( ':' ); 49 } 50 return sb.toString(); 51 } 52 53 public List getValidities() 54 { 55 return Collections.unmodifiableList(m_list); 56 } 57 58 SourceValidity getValidity(final int index) 59 { 60 return (SourceValidity) m_list.get(index); 61 } 62 63 } 64 | Popular Tags |