com.opengamma.strata.market.sensitivity.NoPointSensitivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of strata-market Show documentation
Show all versions of strata-market Show documentation
Entities describing the financial market
The newest version!
/*
* Copyright (C) 2015 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.strata.market.sensitivity;
import java.util.function.DoubleUnaryOperator;
import com.opengamma.strata.basics.currency.Currency;
import com.opengamma.strata.collect.ArgChecker;
/**
* An empty implementation of the point sensitivity builder, used where there is no sensitivity.
*/
final class NoPointSensitivity
implements PointSensitivityBuilder {
/**
* Singleton instance.
*/
static final PointSensitivityBuilder INSTANCE = new NoPointSensitivity();
/**
* Restricted constructor.
*/
private NoPointSensitivity() {
}
//-------------------------------------------------------------------------
@Override
public PointSensitivityBuilder withCurrency(Currency currency) {
return this;
}
@Override
public PointSensitivityBuilder mapSensitivity(DoubleUnaryOperator operator) {
return this;
}
@Override
public PointSensitivityBuilder combinedWith(PointSensitivityBuilder other) {
return ArgChecker.notNull(other, "other");
}
@Override
public NoPointSensitivity normalize() {
return this;
}
@Override
public MutablePointSensitivities buildInto(MutablePointSensitivities combination) {
return combination;
}
@Override
public NoPointSensitivity cloned() {
return this;
}
@Override
public String toString() {
return "NoPointSensitivity";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy