litesoft
@ 939
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt package org.litesoft.ui_1_5; import org.litesoft.commonfoundation.typeutils.Objects; import java.util.*; import org.litesoft.core.util.*; import org.litesoft.ui.def.nonpublic.support.*; public class FormDataRowCollector { private FormDataRowKey mFormDataRowKey; private List<AttributeUpdateFormData> mAttributeUpdates = new ArrayList<AttributeUpdateFormData>(); public FormDataRowCollector( FormDataRowKey pFormDataRowKey ) { Objects.assertNotNull( "FormDataRowKey", mFormDataRowKey = pFormDataRowKey ); } public FormDataRowKey getFormDataRowKey() { return mFormDataRowKey; } public void add( AttributeUpdateFormData pAttributeUpdate ) { if ( pAttributeUpdate != null ) { mAttributeUpdates.add( pAttributeUpdate ); } } public AttributeUpdateFormData[] getAttributeUpdates() { return mAttributeUpdates.toArray( new AttributeUpdateFormData[mAttributeUpdates.size()] ); } public String toString() { return toStringBuilder( new StringBuilder().append( "FormDataRowCollector:" ), 0 ).toString(); } public StringBuilder toStringBuilder( StringBuilder pSB, int pDepth ) { mFormDataRowKey.toStringBuilder( pSB, pDepth ); LineIndentUtil.newLine( pSB, pDepth + 1 ).append( "Attributes:" ); for ( AttributeUpdateFormData zAttributeUpdate : mAttributeUpdates ) { LineIndentUtil.newLine( pSB, pDepth + 2 ); zAttributeUpdate.toStringBuilder( pSB, pDepth + 2 ); } return pSB; } } |