@SuppressWarnings(
	{ "unchecked", "rawtypes" })
	public static void makeCopies(Collection<Copier> aFrom, Collection<Copier> aTo)
	{
		if (aFrom == null || aTo == null)
			return;

		List<Copier> fromList = new ArrayList<Copier>(aFrom);
		List<Copier> toList = new ArrayList<Copier>(aTo);
		Collections.sort((List) fromList);
		Collections.sort((List) toList);

		Copier from = null;
		Copier to = null;
		Iterator<Copier> toIter = toList.iterator();
		for (Iterator<Copier> i = fromList.iterator(); i.hasNext() && toIter.hasNext();)
		{
			from = (Copier) i.next();
			to = (Copier) toIter.next();

			// copy data
			to.copy(from);
		}
	}
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static void makeCopies ( Collection < Copier > aFrom , Collection < Copier > aTo ) { if ( aFrom == null || aTo == null ) return ; List < Copier > fromList = new ArrayList < Copier > ( aFrom ) ; List < Copier > toList = new ArrayList < Copier > ( aTo ) ; Collections . sort ( ( List ) fromList ) ; Collections . sort ( ( List ) toList ) ; Copier from = null ; Copier to = null ; Iterator < Copier > toIter = toList . iterator ( ) ; for ( Iterator < Copier > i = fromList . iterator ( ) ; i . hasNext ( ) && toIter . hasNext ( ) ; ) { from = ( Copier ) i . next ( ) ; to = ( Copier ) toIter . next ( ) ; to . copy ( from ) ; } }
Copy data from object to object

@param aFrom
the object to copy from
@param aTo
the object to copy to