org.robobinding.viewattribute.grouped.AttributeGroupBindingException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robobinding Show documentation
Show all versions of robobinding Show documentation
A Presentation Model(MVVM) framework for the Android platform
The newest version!
package org.robobinding.viewattribute.grouped;
import static org.robobinding.util.CollectionUtils.isNotEmpty;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.robobinding.util.Lists;
import org.robobinding.viewattribute.AttributeBindingException;
/**
*
* @since 1.0
* @version $Revision: 1.0 $
* @author Cheng Wei
*/
@SuppressWarnings("serial")
public class AttributeGroupBindingException extends RuntimeException {
private List childAttributeErrors;
public AttributeGroupBindingException() {
childAttributeErrors = Lists.newArrayList();
}
void addChildAttributeError(String attributeName, Throwable cause) {
childAttributeErrors.add(new AttributeBindingException(attributeName, cause));
}
void assertNoErrors() {
if (hasErrors()) {
throw this;
}
}
private boolean hasErrors() {
return isNotEmpty(childAttributeErrors);
}
public Collection getChildAttributeErrors() {
return Collections.unmodifiableCollection(childAttributeErrors);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy