/************************************************************************** * * $Revision: 1.2 $ * $Date: 2003/06/20 11:44:30 $ * * Copyright (C) 2001 CERN - European Organization for Nuclear Research * All rights reserved. **************************************************************************/ package com.c2kernel.property; import java.util.ArrayList; import com.c2kernel.utils.CastorArrayList; public class PropertyArrayList extends CastorArrayList { public PropertyArrayList() { super(); } public PropertyArrayList(ArrayList aList) { super(); // put all properties in order, so later ones with the same name overwrite earlier ones for (Property property : aList) { put(property); } } /** Overwrite */ public void put(Property p) { for (Property thisProp : list) { if (thisProp.getName().equals(p.getName())) { list.remove(thisProp); break; } } list.add(p); } }