org.zkoss.bind.proxy.SetProxy Maven / Gradle / Ivy
/** SetProxy.java.
Purpose:
Description:
History:
2:13:30 PM Dec 29, 2014, Created by jumperchen
Copyright (C) 2014 Potix Corporation. All Rights Reserved.
*/
package org.zkoss.bind.proxy;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
/**
* This class provides a proxy implementation of the Set interface.
* @author jumperchen
* @since 8.0.0
*/
public class SetProxy extends AbstractCollectionProxy implements Set {
private static final long serialVersionUID = 20141229141520L;
public SetProxy(Collection origin, Annotation[] callerAnnots) {
super(origin, callerAnnots);
resetFromOrigin();
}
@SuppressWarnings("unchecked")
protected Collection initCache() {
return new LinkedHashSet(((Collection) getOriginObject()).size());
}
}