class DefaultRegistryImpl implements DefaultRegistry<C> {

    @Override
    public void setMaxSize(final int size) {
        if (size < 0) {
            throw new IllegalArgumentException("The registry size should be a positive number");
        }
        this.maxStackSize = size;
    }

}