public ErrorMap(@NonNull final ImmutableMap<Integer, LensError> errors) { checkArgument(!errors.isEmpty()); this.errors = errors; /* All error pay load classes in error objects should be unique. * If two error objects are having same error code, then error pay load passed by them should also be same. */ checkState(getErrorPayloadClassesList().size() == getErrorPayloadClasses().size(), "In error conf files, error objects defined with different error codes must have different" + " error payload class."); }
@Override public ImmutableSet<Class> getErrorPayloadClasses() { return ImmutableSet.copyOf(getErrorPayloadClassesList()); }
return new ErrorMap(immutableMap);
@Override public ImmutableSet<Class> getErrorPayloadClasses() { return ImmutableSet.copyOf(getErrorPayloadClassesList()); }
return new ErrorMap(immutableMap);
public ErrorMap(@NonNull final ImmutableMap<Integer, LensError> errors) { checkArgument(!errors.isEmpty()); this.errors = errors; /* All error pay load classes in error objects should be unique. * If two error objects are having same error code, then error pay load passed by them should also be same. */ checkState(getErrorPayloadClassesList().size() == getErrorPayloadClasses().size(), "In error conf files, error objects defined with different error codes must have different" + " error payload class."); }