
org.bitbucket.cowwoc.preconditions.NoOpBigDecimalPreconditions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of preconditions Show documentation
Show all versions of preconditions Show documentation
A Java library for enforcing preconditions.
The newest version!
/*
* Copyright 2015 Gili Tzabaro.
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
package org.bitbucket.cowwoc.preconditions;
import java.math.BigDecimal;
/**
* An implementation of BigDecimalPreconditions that does nothing.
*
* @author Gili Tzabari
*/
final class NoOpBigDecimalPreconditions
extends AbstractNoOpNumberPreconditions
implements BigDecimalPreconditions
{
public static final NoOpBigDecimalPreconditions INSTANCE = new NoOpBigDecimalPreconditions();
@Override
public NoOpBigDecimalPreconditions usingException(Class extends RuntimeException> exception)
{
return this;
}
@Override
public BigDecimalPrecisionPreconditions precision()
{
return NoOpBigDecimalPrecisionPreconditions.INSTANCE;
}
@Override
public BigDecimalScalePreconditions scale()
{
return NoOpBigDecimalScalePreconditions.INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy