Package org.nutz.castor.castor

Source Code of org.nutz.castor.castor.Collection2Collection

package org.nutz.castor.castor;

import java.util.Collection;

import org.nutz.castor.Castor;
import org.nutz.castor.FailToCastObjectException;

@SuppressWarnings({"unchecked", "rawtypes"})
public class Collection2Collection extends Castor<Collection, Collection> {

  @Override
  public Collection cast(Collection src, Class<?> toType, String... args)
      throws FailToCastObjectException {
    Collection coll = createCollection(src, toType);
    coll.addAll(src);
    return coll;
  }

}
TOP

Related Classes of org.nutz.castor.castor.Collection2Collection

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.