id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
159,900 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/model/bond/Bond.java | Bond.getAccruedInterest | public double getAccruedInterest(LocalDate date, AnalyticModel model) {
int periodIndex=schedule.getPeriodIndex(date);
Period period=schedule.getPeriod(periodIndex);
DayCountConvention dcc= schedule.getDaycountconvention();
double accruedInterest=getCouponPayment(periodIndex,model)*(dcc.getDaycountFraction(peri... | java | public double getAccruedInterest(LocalDate date, AnalyticModel model) {
int periodIndex=schedule.getPeriodIndex(date);
Period period=schedule.getPeriod(periodIndex);
DayCountConvention dcc= schedule.getDaycountconvention();
double accruedInterest=getCouponPayment(periodIndex,model)*(dcc.getDaycountFraction(peri... | [
"public",
"double",
"getAccruedInterest",
"(",
"LocalDate",
"date",
",",
"AnalyticModel",
"model",
")",
"{",
"int",
"periodIndex",
"=",
"schedule",
".",
"getPeriodIndex",
"(",
"date",
")",
";",
"Period",
"period",
"=",
"schedule",
".",
"getPeriod",
"(",
"perio... | Returns the accrued interest of the bond for a given date.
@param date The date of interest.
@param model The model under which the product is valued.
@return The accrued interest. | [
"Returns",
"the",
"accrued",
"interest",
"of",
"the",
"bond",
"for",
"a",
"given",
"date",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/bond/Bond.java#L309-L315 |
159,901 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/model/bond/Bond.java | Bond.getAccruedInterest | public double getAccruedInterest(double time, AnalyticModel model) {
LocalDate date= FloatingpointDate.getDateFromFloatingPointDate(schedule.getReferenceDate(), time);
return getAccruedInterest(date, model);
} | java | public double getAccruedInterest(double time, AnalyticModel model) {
LocalDate date= FloatingpointDate.getDateFromFloatingPointDate(schedule.getReferenceDate(), time);
return getAccruedInterest(date, model);
} | [
"public",
"double",
"getAccruedInterest",
"(",
"double",
"time",
",",
"AnalyticModel",
"model",
")",
"{",
"LocalDate",
"date",
"=",
"FloatingpointDate",
".",
"getDateFromFloatingPointDate",
"(",
"schedule",
".",
"getReferenceDate",
"(",
")",
",",
"time",
")",
";",... | Returns the accrued interest of the bond for a given time.
@param time The time of interest as double.
@param model The model under which the product is valued.
@return The accrued interest. | [
"Returns",
"the",
"accrued",
"interest",
"of",
"the",
"bond",
"for",
"a",
"given",
"time",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/bond/Bond.java#L324-L327 |
159,902 | finmath/finmath-lib | src/main/java/net/finmath/functions/AnalyticFormulas.java | AnalyticFormulas.blackScholesOptionTheta | public static double blackScholesOptionTheta(
double initialStockValue,
double riskFreeRate,
double volatility,
double optionMaturity,
double optionStrike)
{
if(optionStrike <= 0.0 || optionMaturity <= 0.0)
{
// The Black-Scholes model does not consider it being an option
return 0.0;
}
els... | java | public static double blackScholesOptionTheta(
double initialStockValue,
double riskFreeRate,
double volatility,
double optionMaturity,
double optionStrike)
{
if(optionStrike <= 0.0 || optionMaturity <= 0.0)
{
// The Black-Scholes model does not consider it being an option
return 0.0;
}
els... | [
"public",
"static",
"double",
"blackScholesOptionTheta",
"(",
"double",
"initialStockValue",
",",
"double",
"riskFreeRate",
",",
"double",
"volatility",
",",
"double",
"optionMaturity",
",",
"double",
"optionStrike",
")",
"{",
"if",
"(",
"optionStrike",
"<=",
"0.0",... | This static method calculated the vega of a call option under a Black-Scholes model
@param initialStockValue The initial value of the underlying, i.e., the spot.
@param riskFreeRate The risk free rate of the bank account numerarie.
@param volatility The Black-Scholes volatility.
@param optionMaturity The option maturi... | [
"This",
"static",
"method",
"calculated",
"the",
"vega",
"of",
"a",
"call",
"option",
"under",
"a",
"Black",
"-",
"Scholes",
"model"
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/functions/AnalyticFormulas.java#L439-L461 |
159,903 | finmath/finmath-lib | src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java | AbstractMonteCarloProduct.getValues | public Map<String, Object> getValues(double evaluationTime, MonteCarloSimulationInterface model) throws CalculationException
{
RandomVariableInterface values = getValue(evaluationTime, model);
if(values == null) {
return null;
}
// Sum up values on path
double value = values.getAverage();
double error... | java | public Map<String, Object> getValues(double evaluationTime, MonteCarloSimulationInterface model) throws CalculationException
{
RandomVariableInterface values = getValue(evaluationTime, model);
if(values == null) {
return null;
}
// Sum up values on path
double value = values.getAverage();
double error... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getValues",
"(",
"double",
"evaluationTime",
",",
"MonteCarloSimulationInterface",
"model",
")",
"throws",
"CalculationException",
"{",
"RandomVariableInterface",
"values",
"=",
"getValue",
"(",
"evaluationTime",
",... | This method returns the value of the product under the specified model and other information in a key-value map.
@param evaluationTime The time on which this products value should be observed.
@param model A model used to evaluate the product.
@return The values of the product.
@throws net.finmath.exception.Calculatio... | [
"This",
"method",
"returns",
"the",
"value",
"of",
"the",
"product",
"under",
"the",
"specified",
"model",
"and",
"other",
"information",
"in",
"a",
"key",
"-",
"value",
"map",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java#L113-L130 |
159,904 | finmath/finmath-lib | src/main/java6/net/finmath/interpolation/RationalFunctionInterpolation.java | RationalFunctionInterpolation.getValue | public double getValue(double x)
{
synchronized(interpolatingRationalFunctionsLazyInitLock) {
if(interpolatingRationalFunctions == null) {
doCreateRationalFunctions();
}
}
// Get interpolating rational function for the given point x
int pointIndex = java.util.Arrays.binarySearch(points, x);
if(poi... | java | public double getValue(double x)
{
synchronized(interpolatingRationalFunctionsLazyInitLock) {
if(interpolatingRationalFunctions == null) {
doCreateRationalFunctions();
}
}
// Get interpolating rational function for the given point x
int pointIndex = java.util.Arrays.binarySearch(points, x);
if(poi... | [
"public",
"double",
"getValue",
"(",
"double",
"x",
")",
"{",
"synchronized",
"(",
"interpolatingRationalFunctionsLazyInitLock",
")",
"{",
"if",
"(",
"interpolatingRationalFunctions",
"==",
"null",
")",
"{",
"doCreateRationalFunctions",
"(",
")",
";",
"}",
"}",
"/... | Get an interpolated value for a given argument x.
@param x The abscissa at which the interpolation should be performed.
@return The interpolated value (ordinate). | [
"Get",
"an",
"interpolated",
"value",
"for",
"a",
"given",
"argument",
"x",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/interpolation/RationalFunctionInterpolation.java#L186-L228 |
159,905 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableUniqueVariable.java | RandomVariableUniqueVariable.getGradient | public RandomVariable[] getGradient(){
// for now let us take the case for output-dimension equal to one!
int numberOfVariables = getNumberOfVariablesInList();
int numberOfCalculationSteps = factory.getNumberOfEntriesInList();
RandomVariable[] omega_hat = new RandomVariable[numberOfCalculationSteps];
... | java | public RandomVariable[] getGradient(){
// for now let us take the case for output-dimension equal to one!
int numberOfVariables = getNumberOfVariablesInList();
int numberOfCalculationSteps = factory.getNumberOfEntriesInList();
RandomVariable[] omega_hat = new RandomVariable[numberOfCalculationSteps];
... | [
"public",
"RandomVariable",
"[",
"]",
"getGradient",
"(",
")",
"{",
"// for now let us take the case for output-dimension equal to one!\r",
"int",
"numberOfVariables",
"=",
"getNumberOfVariablesInList",
"(",
")",
";",
"int",
"numberOfCalculationSteps",
"=",
"factory",
".",
... | Apply the AAD algorithm to this very variable
NOTE: in this case it is indeed correct to assume that the output dimension is "one"
meaning that there is only one {@link RandomVariableUniqueVariable} as an output.
@return gradient for the built up function | [
"Apply",
"the",
"AAD",
"algorithm",
"to",
"this",
"very",
"variable"
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/automaticdifferentiation/backward/alternative/RandomVariableUniqueVariable.java#L712-L754 |
159,906 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/model/volatilities/AbstractVolatilitySurfaceParametric.java | AbstractVolatilitySurfaceParametric.getCloneCalibrated | public AbstractVolatilitySurfaceParametric getCloneCalibrated(final AnalyticModel calibrationModel, final Vector<AnalyticProduct> calibrationProducts, final List<Double> calibrationTargetValues, Map<String,Object> calibrationParameters, final ParameterTransformation parameterTransformation, OptimizerFactory optimizerFa... | java | public AbstractVolatilitySurfaceParametric getCloneCalibrated(final AnalyticModel calibrationModel, final Vector<AnalyticProduct> calibrationProducts, final List<Double> calibrationTargetValues, Map<String,Object> calibrationParameters, final ParameterTransformation parameterTransformation, OptimizerFactory optimizerFa... | [
"public",
"AbstractVolatilitySurfaceParametric",
"getCloneCalibrated",
"(",
"final",
"AnalyticModel",
"calibrationModel",
",",
"final",
"Vector",
"<",
"AnalyticProduct",
">",
"calibrationProducts",
",",
"final",
"List",
"<",
"Double",
">",
"calibrationTargetValues",
",",
... | Create a clone of this volatility surface using a generic calibration
of its parameters to given market data.
@param calibrationModel The model used during calibration (contains additional objects required during valuation, e.g. curves).
@param calibrationProducts The calibration products.
@param calibrationTargetValu... | [
"Create",
"a",
"clone",
"of",
"this",
"volatility",
"surface",
"using",
"a",
"generic",
"calibration",
"of",
"its",
"parameters",
"to",
"given",
"market",
"data",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/volatilities/AbstractVolatilitySurfaceParametric.java#L81-L110 |
159,907 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/model/curves/SeasonalCurve.java | SeasonalCurve.computeSeasonalAdjustments | public static double[] computeSeasonalAdjustments(double[] realizedCPIValues, int lastMonth, int numberOfYearsToAverage) {
/*
* Cacluate average log returns
*/
double[] averageLogReturn = new double[12];
Arrays.fill(averageLogReturn, 0.0);
for(int arrayIndex = 0; arrayIndex < 12*numberOfYearsToAverage; a... | java | public static double[] computeSeasonalAdjustments(double[] realizedCPIValues, int lastMonth, int numberOfYearsToAverage) {
/*
* Cacluate average log returns
*/
double[] averageLogReturn = new double[12];
Arrays.fill(averageLogReturn, 0.0);
for(int arrayIndex = 0; arrayIndex < 12*numberOfYearsToAverage; a... | [
"public",
"static",
"double",
"[",
"]",
"computeSeasonalAdjustments",
"(",
"double",
"[",
"]",
"realizedCPIValues",
",",
"int",
"lastMonth",
",",
"int",
"numberOfYearsToAverage",
")",
"{",
"/*\n\t\t * Cacluate average log returns\n\t\t */",
"double",
"[",
"]",
"averageL... | Computes annualized seasonal adjustments from given monthly realized CPI values.
@param realizedCPIValues An array of consecutive monthly CPI values (minimum size is 12*numberOfYearsToAverage))
@param lastMonth The index of the last month in the sequence of realizedCPIValues (corresponding to the enums in <code>{@link... | [
"Computes",
"annualized",
"seasonal",
"adjustments",
"from",
"given",
"monthly",
"realized",
"CPI",
"values",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/SeasonalCurve.java#L176-L211 |
159,908 | finmath/finmath-lib | src/main/java/net/finmath/modelling/productfactory/ProductFactoryCascade.java | ProductFactoryCascade.addFactoryBefore | public ProductFactoryCascade<T> addFactoryBefore(ProductFactory<? extends T> factory) {
ArrayList<ProductFactory<? extends T>> factories = new ArrayList<ProductFactory<? extends T>>(this.factories.size()+1);
factories.addAll(this.factories);
factories.add(0, factory);
return new ProductFactoryCascade<>(factorie... | java | public ProductFactoryCascade<T> addFactoryBefore(ProductFactory<? extends T> factory) {
ArrayList<ProductFactory<? extends T>> factories = new ArrayList<ProductFactory<? extends T>>(this.factories.size()+1);
factories.addAll(this.factories);
factories.add(0, factory);
return new ProductFactoryCascade<>(factorie... | [
"public",
"ProductFactoryCascade",
"<",
"T",
">",
"addFactoryBefore",
"(",
"ProductFactory",
"<",
"?",
"extends",
"T",
">",
"factory",
")",
"{",
"ArrayList",
"<",
"ProductFactory",
"<",
"?",
"extends",
"T",
">",
">",
"factories",
"=",
"new",
"ArrayList",
"<"... | Add a given factory to the list of factories at the BEGINNING.
@param factory The factory to be added.
@return Cascade with amended factory list. | [
"Add",
"a",
"given",
"factory",
"to",
"the",
"list",
"of",
"factories",
"at",
"the",
"BEGINNING",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/modelling/productfactory/ProductFactoryCascade.java#L49-L54 |
159,909 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/products/ForwardRateVolatilitySurfaceCurvature.java | ForwardRateVolatilitySurfaceCurvature.getValues | public RandomVariable getValues(double evaluationTime, LIBORMarketModel model) {
if(evaluationTime > 0) {
throw new RuntimeException("Forward start evaluation currently not supported.");
}
// Fetch the covariance model of the model
LIBORCovarianceModel covarianceModel = model.getCovarianceModel();
// We ... | java | public RandomVariable getValues(double evaluationTime, LIBORMarketModel model) {
if(evaluationTime > 0) {
throw new RuntimeException("Forward start evaluation currently not supported.");
}
// Fetch the covariance model of the model
LIBORCovarianceModel covarianceModel = model.getCovarianceModel();
// We ... | [
"public",
"RandomVariable",
"getValues",
"(",
"double",
"evaluationTime",
",",
"LIBORMarketModel",
"model",
")",
"{",
"if",
"(",
"evaluationTime",
">",
"0",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"Forward start evaluation currently not supported.\"",
")",
... | Calculates the squared curvature of the LIBOR instantaneous variance.
@param evaluationTime Time at which the product is evaluated.
@param model A model implementing the LIBORModelMonteCarloSimulationModel
@return The squared curvature of the LIBOR instantaneous variance (reduced a possible tolerance). The return valu... | [
"Calculates",
"the",
"squared",
"curvature",
"of",
"the",
"LIBOR",
"instantaneous",
"variance",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/ForwardRateVolatilitySurfaceCurvature.java#L117-L179 |
159,910 | finmath/finmath-lib | src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java | AbstractLIBORCovarianceModel.getFactorLoading | public RandomVariableInterface[] getFactorLoading(double time, double component, RandomVariableInterface[] realizationAtTimeIndex) {
int componentIndex = liborPeriodDiscretization.getTimeIndex(component);
if(componentIndex < 0) {
componentIndex = -componentIndex - 2;
}
return getFactorLoading(time, component... | java | public RandomVariableInterface[] getFactorLoading(double time, double component, RandomVariableInterface[] realizationAtTimeIndex) {
int componentIndex = liborPeriodDiscretization.getTimeIndex(component);
if(componentIndex < 0) {
componentIndex = -componentIndex - 2;
}
return getFactorLoading(time, component... | [
"public",
"RandomVariableInterface",
"[",
"]",
"getFactorLoading",
"(",
"double",
"time",
",",
"double",
"component",
",",
"RandomVariableInterface",
"[",
"]",
"realizationAtTimeIndex",
")",
"{",
"int",
"componentIndex",
"=",
"liborPeriodDiscretization",
".",
"getTimeIn... | Return the factor loading for a given time and a given component.
The factor loading is the vector <i>f<sub>i</sub></i> such that the scalar product <br>
<i>f<sub>j</sub>f<sub>k</sub> = f<sub>j,1</sub>f<sub>k,1</sub> + ... + f<sub>j,m</sub>f<sub>k,m</sub></i> <br>
is the instantaneous covariance of the component <i>j<... | [
"Return",
"the",
"factor",
"loading",
"for",
"a",
"given",
"time",
"and",
"a",
"given",
"component",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/interestrate/modelplugins/AbstractLIBORCovarianceModel.java#L63-L69 |
159,911 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java | BermudanSwaptionFromSwapSchedules.getValueUnderlyingNumeraireRelative | private RandomVariable getValueUnderlyingNumeraireRelative(LIBORModelMonteCarloSimulationModel model, Schedule legSchedule, boolean paysFloat, double swaprate, double notional) throws CalculationException {
RandomVariable value = model.getRandomVariableForConstant(0.0);
for(int periodIndex = legSchedule.getNumb... | java | private RandomVariable getValueUnderlyingNumeraireRelative(LIBORModelMonteCarloSimulationModel model, Schedule legSchedule, boolean paysFloat, double swaprate, double notional) throws CalculationException {
RandomVariable value = model.getRandomVariableForConstant(0.0);
for(int periodIndex = legSchedule.getNumb... | [
"private",
"RandomVariable",
"getValueUnderlyingNumeraireRelative",
"(",
"LIBORModelMonteCarloSimulationModel",
"model",
",",
"Schedule",
"legSchedule",
",",
"boolean",
"paysFloat",
",",
"double",
"swaprate",
",",
"double",
"notional",
")",
"throws",
"CalculationException",
... | Calculated the numeraire relative value of an underlying swap leg.
@param model The Monte Carlo model.
@param legSchedule The schedule of the leg.
@param paysFloat If true a floating rate is payed.
@param swaprate The swaprate. May be 0.0 for pure floating leg.
@param notional The notional.
@return The sum of the nume... | [
"Calculated",
"the",
"numeraire",
"relative",
"value",
"of",
"an",
"underlying",
"swap",
"leg",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java#L292-L314 |
159,912 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java | BermudanSwaptionFromSwapSchedules.getConditionalExpectationEstimator | public ConditionalExpectationEstimator getConditionalExpectationEstimator(double exerciseTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
RandomVariable[] regressionBasisFunctions = regressionBasisFunctionProvider.getBasisFunctions(exerciseTime, model);
return conditionalExpectationR... | java | public ConditionalExpectationEstimator getConditionalExpectationEstimator(double exerciseTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException {
RandomVariable[] regressionBasisFunctions = regressionBasisFunctionProvider.getBasisFunctions(exerciseTime, model);
return conditionalExpectationR... | [
"public",
"ConditionalExpectationEstimator",
"getConditionalExpectationEstimator",
"(",
"double",
"exerciseTime",
",",
"LIBORModelMonteCarloSimulationModel",
"model",
")",
"throws",
"CalculationException",
"{",
"RandomVariable",
"[",
"]",
"regressionBasisFunctions",
"=",
"regress... | The conditional expectation is calculated using a Monte-Carlo regression technique.
@param exerciseTime The exercise time
@param model The valuation model
@return The condition expectation estimator
@throws CalculationException Thrown if underlying model failed to calculate stochastic process. | [
"The",
"conditional",
"expectation",
"is",
"calculated",
"using",
"a",
"Monte",
"-",
"Carlo",
"regression",
"technique",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java#L324-L327 |
159,913 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelStandard.java | LIBORMarketModelStandard.getNumeraire | @Override
public RandomVariable getNumeraire(double time) throws CalculationException {
int timeIndex = getLiborPeriodIndex(time);
if(timeIndex < 0) {
// Interpolation of Numeraire: linear interpolation of the reciprocal.
int lowerIndex = -timeIndex -1;
int upperIndex = -timeIndex;
double alpha = (tim... | java | @Override
public RandomVariable getNumeraire(double time) throws CalculationException {
int timeIndex = getLiborPeriodIndex(time);
if(timeIndex < 0) {
// Interpolation of Numeraire: linear interpolation of the reciprocal.
int lowerIndex = -timeIndex -1;
int upperIndex = -timeIndex;
double alpha = (tim... | [
"@",
"Override",
"public",
"RandomVariable",
"getNumeraire",
"(",
"double",
"time",
")",
"throws",
"CalculationException",
"{",
"int",
"timeIndex",
"=",
"getLiborPeriodIndex",
"(",
"time",
")",
";",
"if",
"(",
"timeIndex",
"<",
"0",
")",
"{",
"// Interpolation o... | Return the numeraire at a given time.
The numeraire is provided for interpolated points. If requested on points which are not
part of the tenor discretization, the numeraire uses a linear interpolation of the reciprocal
value. See ISBN 0470047224 for details.
@param time Time time <i>t</i> for which the numeraire shou... | [
"Return",
"the",
"numeraire",
"at",
"a",
"given",
"time",
".",
"The",
"numeraire",
"is",
"provided",
"for",
"interpolated",
"points",
".",
"If",
"requested",
"on",
"points",
"which",
"are",
"not",
"part",
"of",
"the",
"tenor",
"discretization",
"the",
"numer... | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelStandard.java#L282-L341 |
159,914 | finmath/finmath-lib | src/main/java/net/finmath/finitedifference/solvers/FDMThetaMethod.java | FDMThetaMethod.u_neg_inf | private double u_neg_inf(double x, double tau) {
return f(boundaryCondition.getValueAtLowerBoundary(model, f_t(tau), f_s(x)), x, tau);
} | java | private double u_neg_inf(double x, double tau) {
return f(boundaryCondition.getValueAtLowerBoundary(model, f_t(tau), f_s(x)), x, tau);
} | [
"private",
"double",
"u_neg_inf",
"(",
"double",
"x",
",",
"double",
"tau",
")",
"{",
"return",
"f",
"(",
"boundaryCondition",
".",
"getValueAtLowerBoundary",
"(",
"model",
",",
"f_t",
"(",
"tau",
")",
",",
"f_s",
"(",
"x",
")",
")",
",",
"x",
",",
"... | Heat Equation Boundary Conditions | [
"Heat",
"Equation",
"Boundary",
"Conditions"
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/finitedifference/solvers/FDMThetaMethod.java#L150-L152 |
159,915 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/conditionalexpectation/LinearRegression.java | LinearRegression.getRegressionCoefficients | public double[] getRegressionCoefficients(RandomVariable value) {
if(basisFunctions.length == 0) {
return new double[] { };
}
else if(basisFunctions.length == 1) {
/*
* Regression with one basis function is just a projection on that vector. <b,x>/<b,b>
*/
return new double[] { value.mult(basisFun... | java | public double[] getRegressionCoefficients(RandomVariable value) {
if(basisFunctions.length == 0) {
return new double[] { };
}
else if(basisFunctions.length == 1) {
/*
* Regression with one basis function is just a projection on that vector. <b,x>/<b,b>
*/
return new double[] { value.mult(basisFun... | [
"public",
"double",
"[",
"]",
"getRegressionCoefficients",
"(",
"RandomVariable",
"value",
")",
"{",
"if",
"(",
"basisFunctions",
".",
"length",
"==",
"0",
")",
"{",
"return",
"new",
"double",
"[",
"]",
"{",
"}",
";",
"}",
"else",
"if",
"(",
"basisFuncti... | Get the vector of regression coefficients.
@param value The random variable to regress.
@return The vector of regression coefficients. | [
"Get",
"the",
"vector",
"of",
"regression",
"coefficients",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/conditionalexpectation/LinearRegression.java#L36-L88 |
159,916 | finmath/finmath-lib | src/main/java/net/finmath/modelling/descriptor/xmlparser/FPMLParser.java | FPMLParser.getSwapProductDescriptor | private ProductDescriptor getSwapProductDescriptor(Element trade) {
InterestRateSwapLegProductDescriptor legReceiver = null;
InterestRateSwapLegProductDescriptor legPayer = null;
NodeList legs = trade.getElementsByTagName("swapStream");
for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) {
... | java | private ProductDescriptor getSwapProductDescriptor(Element trade) {
InterestRateSwapLegProductDescriptor legReceiver = null;
InterestRateSwapLegProductDescriptor legPayer = null;
NodeList legs = trade.getElementsByTagName("swapStream");
for(int legIndex = 0; legIndex < legs.getLength(); legIndex++) {
... | [
"private",
"ProductDescriptor",
"getSwapProductDescriptor",
"(",
"Element",
"trade",
")",
"{",
"InterestRateSwapLegProductDescriptor",
"legReceiver",
"=",
"null",
";",
"InterestRateSwapLegProductDescriptor",
"legPayer",
"=",
"null",
";",
"NodeList",
"legs",
"=",
"trade",
... | Construct an InterestRateSwapProductDescriptor from a node in a FpML file.
@param trade The node containing the swap.
@return Descriptor of the swap. | [
"Construct",
"an",
"InterestRateSwapProductDescriptor",
"from",
"a",
"node",
"in",
"a",
"FpML",
"file",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/modelling/descriptor/xmlparser/FPMLParser.java#L101-L120 |
159,917 | finmath/finmath-lib | src/main/java/net/finmath/information/Library.java | Library.getVersionString | public static String getVersionString() {
String versionString = "UNKNOWN";
Properties propeties = getProperites();
if(propeties != null) {
versionString = propeties.getProperty("finmath-lib.version");
}
return versionString;
} | java | public static String getVersionString() {
String versionString = "UNKNOWN";
Properties propeties = getProperites();
if(propeties != null) {
versionString = propeties.getProperty("finmath-lib.version");
}
return versionString;
} | [
"public",
"static",
"String",
"getVersionString",
"(",
")",
"{",
"String",
"versionString",
"=",
"\"UNKNOWN\"",
";",
"Properties",
"propeties",
"=",
"getProperites",
"(",
")",
";",
"if",
"(",
"propeties",
"!=",
"null",
")",
"{",
"versionString",
"=",
"propetie... | Return the version string of this instance of finmath-lib.
@return The version string of this instance of finmath-lib. | [
"Return",
"the",
"version",
"string",
"of",
"this",
"instance",
"of",
"finmath",
"-",
"lib",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/information/Library.java#L40-L47 |
159,918 | finmath/finmath-lib | src/main/java/net/finmath/information/Library.java | Library.getBuildString | public static String getBuildString() {
String versionString = "UNKNOWN";
Properties propeties = getProperites();
if(propeties != null) {
versionString = propeties.getProperty("finmath-lib.build");
}
return versionString;
} | java | public static String getBuildString() {
String versionString = "UNKNOWN";
Properties propeties = getProperites();
if(propeties != null) {
versionString = propeties.getProperty("finmath-lib.build");
}
return versionString;
} | [
"public",
"static",
"String",
"getBuildString",
"(",
")",
"{",
"String",
"versionString",
"=",
"\"UNKNOWN\"",
";",
"Properties",
"propeties",
"=",
"getProperites",
"(",
")",
";",
"if",
"(",
"propeties",
"!=",
"null",
")",
"{",
"versionString",
"=",
"propeties"... | Return the build string of this instance of finmath-lib.
Currently this is the Git commit hash.
@return The build string of this instance of finmath-lib. | [
"Return",
"the",
"build",
"string",
"of",
"this",
"instance",
"of",
"finmath",
"-",
"lib",
".",
"Currently",
"this",
"is",
"the",
"Git",
"commit",
"hash",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/information/Library.java#L55-L62 |
159,919 | finmath/finmath-lib | src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java | DiscountCurve.createDiscountCurveFromDiscountFactors | public static DiscountCurve createDiscountCurveFromDiscountFactors(String name, double[] times, double[] givenDiscountFactors) {
DiscountCurve discountFactors = new DiscountCurve(name);
for(int timeIndex=0; timeIndex<times.length;timeIndex++) {
discountFactors.addDiscountFactor(times[timeIndex], givenDiscountFa... | java | public static DiscountCurve createDiscountCurveFromDiscountFactors(String name, double[] times, double[] givenDiscountFactors) {
DiscountCurve discountFactors = new DiscountCurve(name);
for(int timeIndex=0; timeIndex<times.length;timeIndex++) {
discountFactors.addDiscountFactor(times[timeIndex], givenDiscountFa... | [
"public",
"static",
"DiscountCurve",
"createDiscountCurveFromDiscountFactors",
"(",
"String",
"name",
",",
"double",
"[",
"]",
"times",
",",
"double",
"[",
"]",
"givenDiscountFactors",
")",
"{",
"DiscountCurve",
"discountFactors",
"=",
"new",
"DiscountCurve",
"(",
"... | Create a discount curve from given times and given discount factors using default interpolation and extrapolation methods.
@param name The name of this discount curve.
@param times Array of times as doubles.
@param givenDiscountFactors Array of corresponding discount factors.
@return A new discount factor object. | [
"Create",
"a",
"discount",
"curve",
"from",
"given",
"times",
"and",
"given",
"discount",
"factors",
"using",
"default",
"interpolation",
"and",
"extrapolation",
"methods",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java#L158-L166 |
159,920 | finmath/finmath-lib | src/main/java/net/finmath/fouriermethod/products/smile/EuropeanOptionSmile.java | EuropeanOptionSmile.getDescriptors | public Map<Double, SingleAssetEuropeanOptionProductDescriptor> getDescriptors(LocalDate referenceDate){
int numberOfStrikes = strikes.length;
HashMap<Double, SingleAssetEuropeanOptionProductDescriptor> descriptors = new HashMap<Double, SingleAssetEuropeanOptionProductDescriptor>();
LocalDate maturityDate = Floa... | java | public Map<Double, SingleAssetEuropeanOptionProductDescriptor> getDescriptors(LocalDate referenceDate){
int numberOfStrikes = strikes.length;
HashMap<Double, SingleAssetEuropeanOptionProductDescriptor> descriptors = new HashMap<Double, SingleAssetEuropeanOptionProductDescriptor>();
LocalDate maturityDate = Floa... | [
"public",
"Map",
"<",
"Double",
",",
"SingleAssetEuropeanOptionProductDescriptor",
">",
"getDescriptors",
"(",
"LocalDate",
"referenceDate",
")",
"{",
"int",
"numberOfStrikes",
"=",
"strikes",
".",
"length",
";",
"HashMap",
"<",
"Double",
",",
"SingleAssetEuropeanOpti... | Return a collection of product descriptors for each option in the smile.
@param referenceDate The reference date (translating the maturity floating point date to dates.
@return a collection of product descriptors for each option in the smile. | [
"Return",
"a",
"collection",
"of",
"product",
"descriptors",
"for",
"each",
"option",
"in",
"the",
"smile",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/fouriermethod/products/smile/EuropeanOptionSmile.java#L88-L99 |
159,921 | finmath/finmath-lib | src/main/java/net/finmath/fouriermethod/products/smile/EuropeanOptionSmile.java | EuropeanOptionSmile.getDescriptor | public SingleAssetEuropeanOptionProductDescriptor getDescriptor(LocalDate referenceDate, int index) throws ArrayIndexOutOfBoundsException{
LocalDate maturityDate = FloatingpointDate.getDateFromFloatingPointDate(referenceDate, maturity);
if(index >= strikes.length) {
throw new ArrayIndexOutOfBoundsException("Stri... | java | public SingleAssetEuropeanOptionProductDescriptor getDescriptor(LocalDate referenceDate, int index) throws ArrayIndexOutOfBoundsException{
LocalDate maturityDate = FloatingpointDate.getDateFromFloatingPointDate(referenceDate, maturity);
if(index >= strikes.length) {
throw new ArrayIndexOutOfBoundsException("Stri... | [
"public",
"SingleAssetEuropeanOptionProductDescriptor",
"getDescriptor",
"(",
"LocalDate",
"referenceDate",
",",
"int",
"index",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"LocalDate",
"maturityDate",
"=",
"FloatingpointDate",
".",
"getDateFromFloatingPointDate",
"("... | Return a product descriptor for a specific strike.
@param referenceDate The reference date (translating the maturity floating point date to dates.
@param index The index corresponding to the strike grid.
@return a product descriptor for a specific strike.
@throws ArrayIndexOutOfBoundsException Thrown if index is out o... | [
"Return",
"a",
"product",
"descriptor",
"for",
"a",
"specific",
"strike",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/fouriermethod/products/smile/EuropeanOptionSmile.java#L109-L116 |
159,922 | finmath/finmath-lib | src/main/java/net/finmath/marketdata2/model/curves/AbstractCurve.java | AbstractCurve.getValues | public RandomVariable[] getValues(double[] times) {
RandomVariable[] values = new RandomVariable[times.length];
for(int i=0; i<times.length; i++) {
values[i] = getValue(null, times[i]);
}
return values;
} | java | public RandomVariable[] getValues(double[] times) {
RandomVariable[] values = new RandomVariable[times.length];
for(int i=0; i<times.length; i++) {
values[i] = getValue(null, times[i]);
}
return values;
} | [
"public",
"RandomVariable",
"[",
"]",
"getValues",
"(",
"double",
"[",
"]",
"times",
")",
"{",
"RandomVariable",
"[",
"]",
"values",
"=",
"new",
"RandomVariable",
"[",
"times",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | Return a vector of values corresponding to a given vector of times.
@param times A given vector of times.
@return A vector of values corresponding to the given vector of times. | [
"Return",
"a",
"vector",
"of",
"values",
"corresponding",
"to",
"a",
"given",
"vector",
"of",
"times",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/AbstractCurve.java#L60-L68 |
159,923 | finmath/finmath-lib | src/main/java6/net/finmath/time/daycount/DayCountConventionFactory.java | DayCountConventionFactory.getDaycount | public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention) {
DayCountConventionInterface daycountConvention = getDayCountConvention(convention);
return daycountConvention.getDaycount(startDate, endDate);
} | java | public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention) {
DayCountConventionInterface daycountConvention = getDayCountConvention(convention);
return daycountConvention.getDaycount(startDate, endDate);
} | [
"public",
"static",
"double",
"getDaycount",
"(",
"LocalDate",
"startDate",
",",
"LocalDate",
"endDate",
",",
"String",
"convention",
")",
"{",
"DayCountConventionInterface",
"daycountConvention",
"=",
"getDayCountConvention",
"(",
"convention",
")",
";",
"return",
"d... | Return the number of days between startDate and endDate given the
specific daycount convention.
@param startDate The start date given as a {@link org.threeten.bp.LocalDate}.
@param endDate The end date given as a {@link org.threeten.bp.LocalDate}.
@param convention A convention string.
@return The number of days withi... | [
"Return",
"the",
"number",
"of",
"days",
"between",
"startDate",
"and",
"endDate",
"given",
"the",
"specific",
"daycount",
"convention",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/time/daycount/DayCountConventionFactory.java#L76-L79 |
159,924 | finmath/finmath-lib | src/main/java/net/finmath/montecarlo/interestrate/products/CMSOption.java | CMSOption.getValue | public double getValue(ForwardCurve forwardCurve, double swaprateVolatility) {
double[] swapTenor = new double[fixingDates.length+1];
System.arraycopy(fixingDates, 0, swapTenor, 0, fixingDates.length);
swapTenor[swapTenor.length-1] = paymentDates[paymentDates.length-1];
TimeDiscretization fixTenor = new TimeDi... | java | public double getValue(ForwardCurve forwardCurve, double swaprateVolatility) {
double[] swapTenor = new double[fixingDates.length+1];
System.arraycopy(fixingDates, 0, swapTenor, 0, fixingDates.length);
swapTenor[swapTenor.length-1] = paymentDates[paymentDates.length-1];
TimeDiscretization fixTenor = new TimeDi... | [
"public",
"double",
"getValue",
"(",
"ForwardCurve",
"forwardCurve",
",",
"double",
"swaprateVolatility",
")",
"{",
"double",
"[",
"]",
"swapTenor",
"=",
"new",
"double",
"[",
"fixingDates",
".",
"length",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",... | This method returns the value of the product using a Black-Scholes model for the swap rate with the Hunt-Kennedy convexity adjustment.
The model is determined by a discount factor curve and a swap rate volatility.
@param forwardCurve The forward curve from which the swap rate is calculated. The discount curve, associa... | [
"This",
"method",
"returns",
"the",
"value",
"of",
"the",
"product",
"using",
"a",
"Black",
"-",
"Scholes",
"model",
"for",
"the",
"swap",
"rate",
"with",
"the",
"Hunt",
"-",
"Kennedy",
"convexity",
"adjustment",
".",
"The",
"model",
"is",
"determined",
"b... | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/CMSOption.java#L132-L143 |
159,925 | finmath/finmath-lib | src/main/java6/net/finmath/marketdata/model/curves/DiscountCurveNelsonSiegelSvensson.java | DiscountCurveNelsonSiegelSvensson.getDiscountFactor | @Override
public double getDiscountFactor(AnalyticModelInterface model, double maturity)
{
// Change time scale
maturity *= timeScaling;
double beta1 = parameter[0];
double beta2 = parameter[1];
double beta3 = parameter[2];
double beta4 = parameter[3];
double tau1 = parameter[4];
double tau2 = para... | java | @Override
public double getDiscountFactor(AnalyticModelInterface model, double maturity)
{
// Change time scale
maturity *= timeScaling;
double beta1 = parameter[0];
double beta2 = parameter[1];
double beta3 = parameter[2];
double beta4 = parameter[3];
double tau1 = parameter[4];
double tau2 = para... | [
"@",
"Override",
"public",
"double",
"getDiscountFactor",
"(",
"AnalyticModelInterface",
"model",
",",
"double",
"maturity",
")",
"{",
"// Change time scale",
"maturity",
"*=",
"timeScaling",
";",
"double",
"beta1",
"=",
"parameter",
"[",
"0",
"]",
";",
"double",
... | Return the discount factor within a given model context for a given maturity.
@param model The model used as a context (not required for this class).
@param maturity The maturity in terms of ACT/365 daycount form this curve reference date. Note that this parameter might get rescaled to a different time parameter.
@see ... | [
"Return",
"the",
"discount",
"factor",
"within",
"a",
"given",
"model",
"context",
"for",
"a",
"given",
"maturity",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/DiscountCurveNelsonSiegelSvensson.java#L71-L93 |
159,926 | finmath/finmath-lib | src/main/java/net/finmath/time/ScheduleGenerator.java | ScheduleGenerator.createScheduleFromConventions | @Deprecated
public static Schedule createScheduleFromConventions(
LocalDate referenceDate,
LocalDate startDate,
String frequency,
double maturity,
String daycountConvention,
String shortPeriodConvention,
String dateRollConvention,
BusinessdayCalendar businessdayCalendar,
int fixingOffsetDays... | java | @Deprecated
public static Schedule createScheduleFromConventions(
LocalDate referenceDate,
LocalDate startDate,
String frequency,
double maturity,
String daycountConvention,
String shortPeriodConvention,
String dateRollConvention,
BusinessdayCalendar businessdayCalendar,
int fixingOffsetDays... | [
"@",
"Deprecated",
"public",
"static",
"Schedule",
"createScheduleFromConventions",
"(",
"LocalDate",
"referenceDate",
",",
"LocalDate",
"startDate",
",",
"String",
"frequency",
",",
"double",
"maturity",
",",
"String",
"daycountConvention",
",",
"String",
"shortPeriodC... | Generates a schedule based on some meta data. The schedule generation
considers short periods.
@param referenceDate The date which is used in the schedule to internally convert dates to doubles, i.e., the date where t=0.
@param startDate The start date of the first period.
@param frequency The frequency.
@param maturi... | [
"Generates",
"a",
"schedule",
"based",
"on",
"some",
"meta",
"data",
".",
"The",
"schedule",
"generation",
"considers",
"short",
"periods",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/time/ScheduleGenerator.java#L745-L774 |
159,927 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/model/curves/locallinearregression/CurveEstimation.java | CurveEstimation.getRegressionCurve | public Curve getRegressionCurve(){
// @TODO Add threadsafe lazy init.
if(regressionCurve !=null) {
return regressionCurve;
}
DoubleMatrix a = solveEquationSystem();
double[] curvePoints=new double[partition.getLength()];
curvePoints[0]=a.get(0);
for(int i=1;i<curvePoints.length;i++) {
curvePoints[i]... | java | public Curve getRegressionCurve(){
// @TODO Add threadsafe lazy init.
if(regressionCurve !=null) {
return regressionCurve;
}
DoubleMatrix a = solveEquationSystem();
double[] curvePoints=new double[partition.getLength()];
curvePoints[0]=a.get(0);
for(int i=1;i<curvePoints.length;i++) {
curvePoints[i]... | [
"public",
"Curve",
"getRegressionCurve",
"(",
")",
"{",
"// @TODO Add threadsafe lazy init.",
"if",
"(",
"regressionCurve",
"!=",
"null",
")",
"{",
"return",
"regressionCurve",
";",
"}",
"DoubleMatrix",
"a",
"=",
"solveEquationSystem",
"(",
")",
";",
"double",
"["... | Returns the curve resulting from the local linear regression with discrete kernel.
@return The regression curve. | [
"Returns",
"the",
"curve",
"resulting",
"from",
"the",
"local",
"linear",
"regression",
"with",
"discrete",
"kernel",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/curves/locallinearregression/CurveEstimation.java#L123-L142 |
159,928 | finmath/finmath-lib | src/main/java/net/finmath/marketdata/products/Cap.java | Cap.getValueAsPrice | public double getValueAsPrice(double evaluationTime, AnalyticModel model) {
ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName);
DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName);
DiscountCurve discountCurveForForward = null;
if(forwardCurve == null && forwardCurveName != ... | java | public double getValueAsPrice(double evaluationTime, AnalyticModel model) {
ForwardCurve forwardCurve = model.getForwardCurve(forwardCurveName);
DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName);
DiscountCurve discountCurveForForward = null;
if(forwardCurve == null && forwardCurveName != ... | [
"public",
"double",
"getValueAsPrice",
"(",
"double",
"evaluationTime",
",",
"AnalyticModel",
"model",
")",
"{",
"ForwardCurve",
"forwardCurve",
"=",
"model",
".",
"getForwardCurve",
"(",
"forwardCurveName",
")",
";",
"DiscountCurve",
"discountCurve",
"=",
"model",
... | Returns the value of this product under the given model.
@param evaluationTime Evaluation time.
@param model The model.
@return Value of this product und the given model. | [
"Returns",
"the",
"value",
"of",
"this",
"product",
"under",
"the",
"given",
"model",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/products/Cap.java#L115-L183 |
159,929 | finmath/finmath-lib | src/main/java6/net/finmath/optimizer/LevenbergMarquardt.java | LevenbergMarquardt.setDerivatives | public void setDerivatives(double[] parameters, double[][] derivatives) throws SolverException {
// Calculate new derivatives. Note that this method is called only with
// parameters = parameterCurrent, so we may use valueCurrent.
Vector<Future<double[]>> valueFutures = new Vector<Future<double[]>>(parameterCurr... | java | public void setDerivatives(double[] parameters, double[][] derivatives) throws SolverException {
// Calculate new derivatives. Note that this method is called only with
// parameters = parameterCurrent, so we may use valueCurrent.
Vector<Future<double[]>> valueFutures = new Vector<Future<double[]>>(parameterCurr... | [
"public",
"void",
"setDerivatives",
"(",
"double",
"[",
"]",
"parameters",
",",
"double",
"[",
"]",
"[",
"]",
"derivatives",
")",
"throws",
"SolverException",
"{",
"// Calculate new derivatives. Note that this method is called only with",
"// parameters = parameterCurrent, so... | The derivative of the objective function. You may override this method
if you like to implement your own derivative.
@param parameters Input value. The parameter vector.
@param derivatives Output value, where derivatives[i][j] is d(value(j)) / d(parameters(i)
@throws SolverException Thrown if the valuation fails, spec... | [
"The",
"derivative",
"of",
"the",
"objective",
"function",
".",
"You",
"may",
"override",
"this",
"method",
"if",
"you",
"like",
"to",
"implement",
"your",
"own",
"derivative",
"."
] | a3c067d52dd33feb97d851df6cab130e4116759f | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/optimizer/LevenbergMarquardt.java#L547-L613 |
159,930 | spring-cloud/spring-cloud-stream-app-starters | processor/spring-cloud-starter-stream-processor-tasklaunchrequest-transform/src/main/java/org/springframework/cloud/stream/app/tasklaunchrequest/transform/processor/TasklaunchrequestTransformProcessorConfiguration.java | TasklaunchrequestTransformProcessorConfiguration.parseParams | private List<String> parseParams(String param) {
Assert.hasText(param, "param must not be empty nor null");
List<String> paramsToUse = new ArrayList<>();
Matcher regexMatcher = DEPLOYMENT_PARAMS_PATTERN.matcher(param);
int start = 0;
while (regexMatcher.find()) {
String p = removeQuoting(param.substring(st... | java | private List<String> parseParams(String param) {
Assert.hasText(param, "param must not be empty nor null");
List<String> paramsToUse = new ArrayList<>();
Matcher regexMatcher = DEPLOYMENT_PARAMS_PATTERN.matcher(param);
int start = 0;
while (regexMatcher.find()) {
String p = removeQuoting(param.substring(st... | [
"private",
"List",
"<",
"String",
">",
"parseParams",
"(",
"String",
"param",
")",
"{",
"Assert",
".",
"hasText",
"(",
"param",
",",
"\"param must not be empty nor null\"",
")",
";",
"List",
"<",
"String",
">",
"paramsToUse",
"=",
"new",
"ArrayList",
"<>",
"... | Parses a string of space delimited command line parameters and returns a
list of parameters which doesn't contain any special quoting either for
values or whole parameter.
@param param string containing a list
@return the list | [
"Parses",
"a",
"string",
"of",
"space",
"delimited",
"command",
"line",
"parameters",
"and",
"returns",
"a",
"list",
"of",
"parameters",
"which",
"doesn",
"t",
"contain",
"any",
"special",
"quoting",
"either",
"for",
"values",
"or",
"whole",
"parameter",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/processor/spring-cloud-starter-stream-processor-tasklaunchrequest-transform/src/main/java/org/springframework/cloud/stream/app/tasklaunchrequest/transform/processor/TasklaunchrequestTransformProcessorConfigura... |
159,931 | spring-cloud/spring-cloud-stream-app-starters | gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/support/SqlUtils.java | SqlUtils.load | public static String load(LoadConfiguration config, String prefix) {
if (config.getMode() == Mode.INSERT) {
return loadInsert(config, prefix);
}
else if (config.getMode() == Mode.UPDATE) {
return loadUpdate(config, prefix);
}
throw new IllegalArgumentException("Unsupported mode " + config.getMode());
} | java | public static String load(LoadConfiguration config, String prefix) {
if (config.getMode() == Mode.INSERT) {
return loadInsert(config, prefix);
}
else if (config.getMode() == Mode.UPDATE) {
return loadUpdate(config, prefix);
}
throw new IllegalArgumentException("Unsupported mode " + config.getMode());
} | [
"public",
"static",
"String",
"load",
"(",
"LoadConfiguration",
"config",
",",
"String",
"prefix",
")",
"{",
"if",
"(",
"config",
".",
"getMode",
"(",
")",
"==",
"Mode",
".",
"INSERT",
")",
"{",
"return",
"loadInsert",
"(",
"config",
",",
"prefix",
")",
... | Builds sql clause to load data into a database.
@param config Load configuration.
@param prefix Prefix for temporary resources.
@return the load DDL | [
"Builds",
"sql",
"clause",
"to",
"load",
"data",
"into",
"a",
"database",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/support/SqlUtils.java#L158-L166 |
159,932 | spring-cloud/spring-cloud-stream-app-starters | triggertask/spring-cloud-starter-stream-source-triggertask/src/main/java/org/springframework/cloud/stream/app/triggertask/source/TriggertaskSourceConfiguration.java | TriggertaskSourceConfiguration.parseProperties | public static Map<String, String> parseProperties(String s) {
Map<String, String> properties = new HashMap<String, String>();
if (!StringUtils.isEmpty(s)) {
Matcher matcher = PROPERTIES_PATTERN.matcher(s);
int start = 0;
while (matcher.find()) {
addKeyValuePairAsProperty(s.substring(start, matcher.star... | java | public static Map<String, String> parseProperties(String s) {
Map<String, String> properties = new HashMap<String, String>();
if (!StringUtils.isEmpty(s)) {
Matcher matcher = PROPERTIES_PATTERN.matcher(s);
int start = 0;
while (matcher.find()) {
addKeyValuePairAsProperty(s.substring(start, matcher.star... | [
"public",
"static",
"Map",
"<",
"String",
",",
"String",
">",
"parseProperties",
"(",
"String",
"s",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"if",
"(",... | Parses a String comprised of 0 or more comma-delimited key=value pairs.
@param s the string to parse
@return the Map of parsed key value pairs | [
"Parses",
"a",
"String",
"comprised",
"of",
"0",
"or",
"more",
"comma",
"-",
"delimited",
"key",
"=",
"value",
"pairs",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/triggertask/spring-cloud-starter-stream-source-triggertask/src/main/java/org/springframework/cloud/stream/app/triggertask/source/TriggertaskSourceConfiguration.java#L93-L105 |
159,933 | spring-cloud/spring-cloud-stream-app-starters | gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/GpfdistServer.java | GpfdistServer.start | public synchronized HttpServer<Buffer, Buffer> start() throws Exception {
if (server == null) {
server = createProtocolListener();
}
return server;
} | java | public synchronized HttpServer<Buffer, Buffer> start() throws Exception {
if (server == null) {
server = createProtocolListener();
}
return server;
} | [
"public",
"synchronized",
"HttpServer",
"<",
"Buffer",
",",
"Buffer",
">",
"start",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"server",
"==",
"null",
")",
"{",
"server",
"=",
"createProtocolListener",
"(",
")",
";",
"}",
"return",
"server",
";",
"... | Start a server.
@return the http server
@throws Exception the exception | [
"Start",
"a",
"server",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/GpfdistServer.java#L82-L87 |
159,934 | spring-cloud/spring-cloud-stream-app-starters | gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/support/ReadableTableFactoryBean.java | ReadableTableFactoryBean.setSegmentReject | public void setSegmentReject(String reject) {
if (!StringUtils.hasText(reject)) {
return;
}
Integer parsedLimit = null;
try {
parsedLimit = Integer.parseInt(reject);
segmentRejectType = SegmentRejectType.ROWS;
} catch (NumberFormatException e) {
}
if (parsedLimit == null && reject.contains("%")) ... | java | public void setSegmentReject(String reject) {
if (!StringUtils.hasText(reject)) {
return;
}
Integer parsedLimit = null;
try {
parsedLimit = Integer.parseInt(reject);
segmentRejectType = SegmentRejectType.ROWS;
} catch (NumberFormatException e) {
}
if (parsedLimit == null && reject.contains("%")) ... | [
"public",
"void",
"setSegmentReject",
"(",
"String",
"reject",
")",
"{",
"if",
"(",
"!",
"StringUtils",
".",
"hasText",
"(",
"reject",
")",
")",
"{",
"return",
";",
"}",
"Integer",
"parsedLimit",
"=",
"null",
";",
"try",
"{",
"parsedLimit",
"=",
"Integer... | Sets the segment reject as a string. This method is for convenience
to be able to set percent reject type just by calling with '3%' and
otherwise it uses rows. All this assuming that parsing finds '%' characher
and is able to parse a raw reject number.
@param reject the new segment reject | [
"Sets",
"the",
"segment",
"reject",
"as",
"a",
"string",
".",
"This",
"method",
"is",
"for",
"convenience",
"to",
"be",
"able",
"to",
"set",
"percent",
"reject",
"type",
"just",
"by",
"calling",
"with",
"3%",
"and",
"otherwise",
"it",
"uses",
"rows",
"."... | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/gpfdist/spring-cloud-starter-stream-sink-gpfdist/src/main/java/org/springframework/cloud/stream/app/gpfdist/sink/support/ReadableTableFactoryBean.java#L133-L151 |
159,935 | spring-cloud/spring-cloud-stream-app-starters | twitter/spring-cloud-starter-stream-source-twitterstream/src/main/java/org/springframework/cloud/stream/app/twitterstream/source/AbstractTwitterInboundChannelAdapter.java | AbstractTwitterInboundChannelAdapter.setReadTimeout | public void setReadTimeout(int millis) {
// Hack to get round Spring's dynamic loading of http client stuff
ClientHttpRequestFactory f = getRequestFactory();
if (f instanceof SimpleClientHttpRequestFactory) {
((SimpleClientHttpRequestFactory) f).setReadTimeout(millis);
}
else {
((HttpComponentsClientHtt... | java | public void setReadTimeout(int millis) {
// Hack to get round Spring's dynamic loading of http client stuff
ClientHttpRequestFactory f = getRequestFactory();
if (f instanceof SimpleClientHttpRequestFactory) {
((SimpleClientHttpRequestFactory) f).setReadTimeout(millis);
}
else {
((HttpComponentsClientHtt... | [
"public",
"void",
"setReadTimeout",
"(",
"int",
"millis",
")",
"{",
"// Hack to get round Spring's dynamic loading of http client stuff",
"ClientHttpRequestFactory",
"f",
"=",
"getRequestFactory",
"(",
")",
";",
"if",
"(",
"f",
"instanceof",
"SimpleClientHttpRequestFactory",
... | The read timeout for the underlying URLConnection to the twitter stream. | [
"The",
"read",
"timeout",
"for",
"the",
"underlying",
"URLConnection",
"to",
"the",
"twitter",
"stream",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/twitter/spring-cloud-starter-stream-source-twitterstream/src/main/java/org/springframework/cloud/stream/app/twitterstream/source/AbstractTwitterInboundChannelAdapter.java#L83-L92 |
159,936 | spring-cloud/spring-cloud-stream-app-starters | twitter/spring-cloud-starter-stream-source-twitterstream/src/main/java/org/springframework/cloud/stream/app/twitterstream/source/AbstractTwitterInboundChannelAdapter.java | AbstractTwitterInboundChannelAdapter.setConnectTimeout | public void setConnectTimeout(int millis) {
ClientHttpRequestFactory f = getRequestFactory();
if (f instanceof SimpleClientHttpRequestFactory) {
((SimpleClientHttpRequestFactory) f).setConnectTimeout(millis);
}
else {
((HttpComponentsClientHttpRequestFactory) f).setConnectTimeout(millis);
}
} | java | public void setConnectTimeout(int millis) {
ClientHttpRequestFactory f = getRequestFactory();
if (f instanceof SimpleClientHttpRequestFactory) {
((SimpleClientHttpRequestFactory) f).setConnectTimeout(millis);
}
else {
((HttpComponentsClientHttpRequestFactory) f).setConnectTimeout(millis);
}
} | [
"public",
"void",
"setConnectTimeout",
"(",
"int",
"millis",
")",
"{",
"ClientHttpRequestFactory",
"f",
"=",
"getRequestFactory",
"(",
")",
";",
"if",
"(",
"f",
"instanceof",
"SimpleClientHttpRequestFactory",
")",
"{",
"(",
"(",
"SimpleClientHttpRequestFactory",
")"... | The connection timeout for making a connection to Twitter. | [
"The",
"connection",
"timeout",
"for",
"making",
"a",
"connection",
"to",
"Twitter",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/twitter/spring-cloud-starter-stream-source-twitterstream/src/main/java/org/springframework/cloud/stream/app/twitterstream/source/AbstractTwitterInboundChannelAdapter.java#L97-L105 |
159,937 | spring-cloud/spring-cloud-stream-app-starters | websocket/spring-cloud-starter-stream-sink-websocket/src/main/java/org/springframework/cloud/stream/app/websocket/sink/WebsocketSinkServerHandler.java | WebsocketSinkServerHandler.handleTextWebSocketFrameInternal | private void handleTextWebSocketFrameInternal(TextWebSocketFrame frame, ChannelHandlerContext ctx) {
if (logger.isTraceEnabled()) {
logger.trace(String.format("%s received %s", ctx.channel(), frame.text()));
}
addTraceForFrame(frame, "text");
ctx.channel().write(new TextWebSocketFrame("Echo: " + frame.text(... | java | private void handleTextWebSocketFrameInternal(TextWebSocketFrame frame, ChannelHandlerContext ctx) {
if (logger.isTraceEnabled()) {
logger.trace(String.format("%s received %s", ctx.channel(), frame.text()));
}
addTraceForFrame(frame, "text");
ctx.channel().write(new TextWebSocketFrame("Echo: " + frame.text(... | [
"private",
"void",
"handleTextWebSocketFrameInternal",
"(",
"TextWebSocketFrame",
"frame",
",",
"ChannelHandlerContext",
"ctx",
")",
"{",
"if",
"(",
"logger",
".",
"isTraceEnabled",
"(",
")",
")",
"{",
"logger",
".",
"trace",
"(",
"String",
".",
"format",
"(",
... | simple echo implementation | [
"simple",
"echo",
"implementation"
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/websocket/spring-cloud-starter-stream-sink-websocket/src/main/java/org/springframework/cloud/stream/app/websocket/sink/WebsocketSinkServerHandler.java#L157-L164 |
159,938 | spring-cloud/spring-cloud-stream-app-starters | websocket/spring-cloud-starter-stream-sink-websocket/src/main/java/org/springframework/cloud/stream/app/websocket/sink/WebsocketSinkServerHandler.java | WebsocketSinkServerHandler.addTraceForFrame | private void addTraceForFrame(WebSocketFrame frame, String type) {
Map<String, Object> trace = new LinkedHashMap<>();
trace.put("type", type);
trace.put("direction", "in");
if (frame instanceof TextWebSocketFrame) {
trace.put("payload", ((TextWebSocketFrame) frame).text());
}
if (traceEnabled) {
webs... | java | private void addTraceForFrame(WebSocketFrame frame, String type) {
Map<String, Object> trace = new LinkedHashMap<>();
trace.put("type", type);
trace.put("direction", "in");
if (frame instanceof TextWebSocketFrame) {
trace.put("payload", ((TextWebSocketFrame) frame).text());
}
if (traceEnabled) {
webs... | [
"private",
"void",
"addTraceForFrame",
"(",
"WebSocketFrame",
"frame",
",",
"String",
"type",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"trace",
"=",
"new",
"LinkedHashMap",
"<>",
"(",
")",
";",
"trace",
".",
"put",
"(",
"\"type\"",
",",
"type"... | add trace information for received frame | [
"add",
"trace",
"information",
"for",
"received",
"frame"
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/websocket/spring-cloud-starter-stream-sink-websocket/src/main/java/org/springframework/cloud/stream/app/websocket/sink/WebsocketSinkServerHandler.java#L167-L178 |
159,939 | spring-cloud/spring-cloud-stream-app-starters | mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java | MailSourceConfiguration.getFlowBuilder | @SuppressWarnings({ "rawtypes", "unchecked" })
private IntegrationFlowBuilder getFlowBuilder() {
IntegrationFlowBuilder flowBuilder;
URLName urlName = this.properties.getUrl();
if (this.properties.isIdleImap()) {
flowBuilder = getIdleImapFlow(urlName);
}
else {
MailInboundChannelAdapterSpec adapterS... | java | @SuppressWarnings({ "rawtypes", "unchecked" })
private IntegrationFlowBuilder getFlowBuilder() {
IntegrationFlowBuilder flowBuilder;
URLName urlName = this.properties.getUrl();
if (this.properties.isIdleImap()) {
flowBuilder = getIdleImapFlow(urlName);
}
else {
MailInboundChannelAdapterSpec adapterS... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
",",
"\"unchecked\"",
"}",
")",
"private",
"IntegrationFlowBuilder",
"getFlowBuilder",
"(",
")",
"{",
"IntegrationFlowBuilder",
"flowBuilder",
";",
"URLName",
"urlName",
"=",
"this",
".",
"properties",
".",
"getUrl"... | Method to build Integration Flow for Mail. Suppress Warnings for
MailInboundChannelAdapterSpec.
@return Integration Flow object for Mail Source | [
"Method",
"to",
"build",
"Integration",
"Flow",
"for",
"Mail",
".",
"Suppress",
"Warnings",
"for",
"MailInboundChannelAdapterSpec",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java#L73-L114 |
159,940 | spring-cloud/spring-cloud-stream-app-starters | mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java | MailSourceConfiguration.getIdleImapFlow | private IntegrationFlowBuilder getIdleImapFlow(URLName urlName) {
return IntegrationFlows.from(Mail.imapIdleAdapter(urlName.toString())
.shouldDeleteMessages(this.properties.isDelete())
.javaMailProperties(getJavaMailProperties(urlName))
.selectorExpression(this.properties.getExpression())
.shouldMark... | java | private IntegrationFlowBuilder getIdleImapFlow(URLName urlName) {
return IntegrationFlows.from(Mail.imapIdleAdapter(urlName.toString())
.shouldDeleteMessages(this.properties.isDelete())
.javaMailProperties(getJavaMailProperties(urlName))
.selectorExpression(this.properties.getExpression())
.shouldMark... | [
"private",
"IntegrationFlowBuilder",
"getIdleImapFlow",
"(",
"URLName",
"urlName",
")",
"{",
"return",
"IntegrationFlows",
".",
"from",
"(",
"Mail",
".",
"imapIdleAdapter",
"(",
"urlName",
".",
"toString",
"(",
")",
")",
".",
"shouldDeleteMessages",
"(",
"this",
... | Method to build Integration flow for IMAP Idle configuration.
@param urlName Mail source URL.
@return Integration Flow object IMAP IDLE. | [
"Method",
"to",
"build",
"Integration",
"flow",
"for",
"IMAP",
"Idle",
"configuration",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java#L121-L127 |
159,941 | spring-cloud/spring-cloud-stream-app-starters | mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java | MailSourceConfiguration.getImapFlowBuilder | @SuppressWarnings("rawtypes")
private MailInboundChannelAdapterSpec getImapFlowBuilder(URLName urlName) {
return Mail.imapInboundAdapter(urlName.toString())
.shouldMarkMessagesAsRead(this.properties.isMarkAsRead());
} | java | @SuppressWarnings("rawtypes")
private MailInboundChannelAdapterSpec getImapFlowBuilder(URLName urlName) {
return Mail.imapInboundAdapter(urlName.toString())
.shouldMarkMessagesAsRead(this.properties.isMarkAsRead());
} | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"private",
"MailInboundChannelAdapterSpec",
"getImapFlowBuilder",
"(",
"URLName",
"urlName",
")",
"{",
"return",
"Mail",
".",
"imapInboundAdapter",
"(",
"urlName",
".",
"toString",
"(",
")",
")",
".",
"shouldMarkMes... | Method to build Mail Channel Adapter for IMAP.
@param urlName Mail source URL.
@return Mail Channel for IMAP | [
"Method",
"to",
"build",
"Mail",
"Channel",
"Adapter",
"for",
"IMAP",
"."
] | c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9 | https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/mail/spring-cloud-starter-stream-source-mail/src/main/java/org/springframework/cloud/stream/app/mail/source/MailSourceConfiguration.java#L144-L148 |
159,942 | spring-projects/spring-social-facebook | spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/CanvasSignInController.java | CanvasSignInController.postDeclineView | protected View postDeclineView() {
return new TopLevelWindowRedirect() {
@Override
protected String getRedirectUrl(Map<String, ?> model) {
return postDeclineUrl;
}
};
} | java | protected View postDeclineView() {
return new TopLevelWindowRedirect() {
@Override
protected String getRedirectUrl(Map<String, ?> model) {
return postDeclineUrl;
}
};
} | [
"protected",
"View",
"postDeclineView",
"(",
")",
"{",
"return",
"new",
"TopLevelWindowRedirect",
"(",
")",
"{",
"@",
"Override",
"protected",
"String",
"getRedirectUrl",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"model",
")",
"{",
"return",
"postDeclineUrl",
... | View that redirects the top level window to the URL defined in postDeclineUrl property after user declines to authorize application.
May be overridden for custom views, particularly in the case where the post-decline view should be rendered in-canvas.
@return a view to display after a user declines authoriation. Defaul... | [
"View",
"that",
"redirects",
"the",
"top",
"level",
"window",
"to",
"the",
"URL",
"defined",
"in",
"postDeclineUrl",
"property",
"after",
"user",
"declines",
"to",
"authorize",
"application",
".",
"May",
"be",
"overridden",
"for",
"custom",
"views",
"particularl... | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/CanvasSignInController.java#L165-L172 |
159,943 | spring-projects/spring-social-facebook | spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java | SignedRequestDecoder.decodeSignedRequest | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} | java | @SuppressWarnings("unchecked")
public Map<String, ?> decodeSignedRequest(String signedRequest) throws SignedRequestException {
return decodeSignedRequest(signedRequest, Map.class);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Map",
"<",
"String",
",",
"?",
">",
"decodeSignedRequest",
"(",
"String",
"signedRequest",
")",
"throws",
"SignedRequestException",
"{",
"return",
"decodeSignedRequest",
"(",
"signedRequest",
",",
"Map",... | Decodes a signed request, returning the payload of the signed request as a Map
@param signedRequest the value of the signed_request parameter sent by Facebook.
@return the payload of the signed request as a Map
@throws SignedRequestException if there is an error decoding the signed request | [
"Decodes",
"a",
"signed",
"request",
"returning",
"the",
"payload",
"of",
"the",
"signed",
"request",
"as",
"a",
"Map"
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java#L58-L61 |
159,944 | spring-projects/spring-social-facebook | spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java | SignedRequestDecoder.decodeSignedRequest | public <T> T decodeSignedRequest(String signedRequest, Class<T> type) throws SignedRequestException {
String[] split = signedRequest.split("\\.");
String encodedSignature = split[0];
String payload = split[1];
String decoded = base64DecodeToString(payload);
byte[] signature = base64DecodeToBytes(encodedSi... | java | public <T> T decodeSignedRequest(String signedRequest, Class<T> type) throws SignedRequestException {
String[] split = signedRequest.split("\\.");
String encodedSignature = split[0];
String payload = split[1];
String decoded = base64DecodeToString(payload);
byte[] signature = base64DecodeToBytes(encodedSi... | [
"public",
"<",
"T",
">",
"T",
"decodeSignedRequest",
"(",
"String",
"signedRequest",
",",
"Class",
"<",
"T",
">",
"type",
")",
"throws",
"SignedRequestException",
"{",
"String",
"[",
"]",
"split",
"=",
"signedRequest",
".",
"split",
"(",
"\"\\\\.\"",
")",
... | Decodes a signed request, returning the payload of the signed request as a specified type.
@param signedRequest the value of the signed_request parameter sent by Facebook.
@param type the type to bind the signed_request to.
@param <T> the Java type to bind the signed_request to.
@return the payload of the signed reques... | [
"Decodes",
"a",
"signed",
"request",
"returning",
"the",
"payload",
"of",
"the",
"signed",
"request",
"as",
"a",
"specified",
"type",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestDecoder.java#L71-L91 |
159,945 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getString | public String getString(String fieldName) {
return hasValue(fieldName) ? String.valueOf(resultMap.get(fieldName)) : null;
} | java | public String getString(String fieldName) {
return hasValue(fieldName) ? String.valueOf(resultMap.get(fieldName)) : null;
} | [
"public",
"String",
"getString",
"(",
"String",
"fieldName",
")",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
":",
"null",
";",
"}"
] | Returns the value of the identified field as a String.
@param fieldName the name of the field
@return the value of the field as a String | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"String",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L45-L47 |
159,946 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getInteger | public Integer getInteger(String fieldName) {
try {
return hasValue(fieldName) ? Integer.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | java | public Integer getInteger(String fieldName) {
try {
return hasValue(fieldName) ? Integer.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"public",
"Integer",
"getInteger",
"(",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"Integer",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
")"... | Returns the value of the identified field as an Integer.
@param fieldName the name of the field
@return the value of the field as an Integer
@throws FqlException if the field cannot be expressed as an Integer | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"an",
"Integer",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L55-L61 |
159,947 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getLong | public Long getLong(String fieldName) {
try {
return hasValue(fieldName) ? Long.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | java | public Long getLong(String fieldName) {
try {
return hasValue(fieldName) ? Long.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"public",
"Long",
"getLong",
"(",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"Long",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
")",
":",
... | Returns the value of the identified field as a Long.
@param fieldName the name of the field
@return the value of the field as a Long
@throws FqlException if the field cannot be expressed as an Long | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"Long",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L69-L75 |
159,948 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getFloat | public Float getFloat(String fieldName) {
try {
return hasValue(fieldName) ? Float.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | java | public Float getFloat(String fieldName) {
try {
return hasValue(fieldName) ? Float.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a number.", e);
}
} | [
"public",
"Float",
"getFloat",
"(",
"String",
"fieldName",
")",
"{",
"try",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"Float",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
")",
":... | Returns the value of the identified field as a Float.
@param fieldName the name of the field
@return the value of the field as a Float
@throws FqlException if the field cannot be expressed as an Float | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"Float",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L83-L89 |
159,949 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getBoolean | public Boolean getBoolean(String fieldName) {
return hasValue(fieldName) ? Boolean.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} | java | public Boolean getBoolean(String fieldName) {
return hasValue(fieldName) ? Boolean.valueOf(String.valueOf(resultMap.get(fieldName))) : null;
} | [
"public",
"Boolean",
"getBoolean",
"(",
"String",
"fieldName",
")",
"{",
"return",
"hasValue",
"(",
"fieldName",
")",
"?",
"Boolean",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
")",
")",
":",
"null... | Returns the value of the identified field as a Boolean.
@param fieldName the name of the field
@return the value of the field as a Boolean | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"Boolean",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L96-L98 |
159,950 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.getTime | public Date getTime(String fieldName) {
try {
if (hasValue(fieldName)) {
return new Date(Long.valueOf(String.valueOf(resultMap.get(fieldName))) * 1000);
} else {
return null;
}
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a time.", e);
}
} | java | public Date getTime(String fieldName) {
try {
if (hasValue(fieldName)) {
return new Date(Long.valueOf(String.valueOf(resultMap.get(fieldName))) * 1000);
} else {
return null;
}
} catch (NumberFormatException e) {
throw new FqlException("Field '" + fieldName +"' is not a time.", e);
}
} | [
"public",
"Date",
"getTime",
"(",
"String",
"fieldName",
")",
"{",
"try",
"{",
"if",
"(",
"hasValue",
"(",
"fieldName",
")",
")",
"{",
"return",
"new",
"Date",
"(",
"Long",
".",
"valueOf",
"(",
"String",
".",
"valueOf",
"(",
"resultMap",
".",
"get",
... | Returns the value of the identified field as a Date.
Time fields returned from an FQL query are expressed in terms of seconds since midnight, January 1, 1970 UTC.
@param fieldName the name of the field
@return the value of the field as a Date
@throws FqlException if the field's value cannot be expressed as a long value... | [
"Returns",
"the",
"value",
"of",
"the",
"identified",
"field",
"as",
"a",
"Date",
".",
"Time",
"fields",
"returned",
"from",
"an",
"FQL",
"query",
"are",
"expressed",
"in",
"terms",
"of",
"seconds",
"since",
"midnight",
"January",
"1",
"1970",
"UTC",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L107-L117 |
159,951 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java | FqlResult.hasValue | public boolean hasValue(String fieldName) {
return resultMap.containsKey(fieldName) && resultMap.get(fieldName) != null;
} | java | public boolean hasValue(String fieldName) {
return resultMap.containsKey(fieldName) && resultMap.get(fieldName) != null;
} | [
"public",
"boolean",
"hasValue",
"(",
"String",
"fieldName",
")",
"{",
"return",
"resultMap",
".",
"containsKey",
"(",
"fieldName",
")",
"&&",
"resultMap",
".",
"get",
"(",
"fieldName",
")",
"!=",
"null",
";",
"}"
] | Checks that a field exists and contains a non-null value.
@param fieldName the name of the field to check existence/value of.
@return true if the field exists in the result set and has a non-null value; false otherwise. | [
"Checks",
"that",
"a",
"field",
"exists",
"and",
"contains",
"a",
"non",
"-",
"null",
"value",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L188-L190 |
159,952 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java | FacebookTemplate.fetchObject | public <T> T fetchObject(String objectId, Class<T> type) {
URI uri = URIBuilder.fromUri(getBaseGraphApiUrl() + objectId).build();
return getRestTemplate().getForObject(uri, type);
} | java | public <T> T fetchObject(String objectId, Class<T> type) {
URI uri = URIBuilder.fromUri(getBaseGraphApiUrl() + objectId).build();
return getRestTemplate().getForObject(uri, type);
} | [
"public",
"<",
"T",
">",
"T",
"fetchObject",
"(",
"String",
"objectId",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"URI",
"uri",
"=",
"URIBuilder",
".",
"fromUri",
"(",
"getBaseGraphApiUrl",
"(",
")",
"+",
"objectId",
")",
".",
"build",
"(",
")",... | low-level Graph API operations | [
"low",
"-",
"level",
"Graph",
"API",
"operations"
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookTemplate.java#L204-L207 |
159,953 | spring-projects/spring-social-facebook | spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/RealTimeUpdateController.java | RealTimeUpdateController.verifySubscription | @RequestMapping(value="/{subscription}", method=GET, params="hub.mode=subscribe")
public @ResponseBody String verifySubscription(
@PathVariable("subscription") String subscription,
@RequestParam("hub.challenge") String challenge,
@RequestParam("hub.verify_token") String verifyToken) {
logger.debug("Received... | java | @RequestMapping(value="/{subscription}", method=GET, params="hub.mode=subscribe")
public @ResponseBody String verifySubscription(
@PathVariable("subscription") String subscription,
@RequestParam("hub.challenge") String challenge,
@RequestParam("hub.verify_token") String verifyToken) {
logger.debug("Received... | [
"@",
"RequestMapping",
"(",
"value",
"=",
"\"/{subscription}\"",
",",
"method",
"=",
"GET",
",",
"params",
"=",
"\"hub.mode=subscribe\"",
")",
"public",
"@",
"ResponseBody",
"String",
"verifySubscription",
"(",
"@",
"PathVariable",
"(",
"\"subscription\"",
")",
"S... | Handles subscription verification callback from Facebook.
@param subscription The subscription name.
@param challenge A challenge that Facebook expects to be returned.
@param verifyToken A verification token that must match with the subscription's token given when the controller was created.
@return The challenge if th... | [
"Handles",
"subscription",
"verification",
"callback",
"from",
"Facebook",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/RealTimeUpdateController.java#L82-L89 |
159,954 | spring-projects/spring-social-facebook | spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookErrorHandler.java | FacebookErrorHandler.handleFacebookError | void handleFacebookError(HttpStatus statusCode, FacebookError error) {
if (error != null && error.getCode() != null) {
int code = error.getCode();
if (code == UNKNOWN) {
throw new UncategorizedApiException(FACEBOOK_PROVIDER_ID, error.getMessage(), null);
} else if (code == SERVICE) {
throw new Se... | java | void handleFacebookError(HttpStatus statusCode, FacebookError error) {
if (error != null && error.getCode() != null) {
int code = error.getCode();
if (code == UNKNOWN) {
throw new UncategorizedApiException(FACEBOOK_PROVIDER_ID, error.getMessage(), null);
} else if (code == SERVICE) {
throw new Se... | [
"void",
"handleFacebookError",
"(",
"HttpStatus",
"statusCode",
",",
"FacebookError",
"error",
")",
"{",
"if",
"(",
"error",
"!=",
"null",
"&&",
"error",
".",
"getCode",
"(",
")",
"!=",
"null",
")",
"{",
"int",
"code",
"=",
"error",
".",
"getCode",
"(",
... | Examines the error data returned from Facebook and throws the most applicable exception.
@param errorDetails a Map containing a "type" and a "message" corresponding to the Graph API's error response structure. | [
"Examines",
"the",
"error",
"data",
"returned",
"from",
"Facebook",
"and",
"throws",
"the",
"most",
"applicable",
"exception",
"."
] | ae2234d94367eaa3adbba251ec7790d5ba7ffa41 | https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/FacebookErrorHandler.java#L66-L95 |
159,955 | Manabu-GT/EtsyBlur | sample/src/main/java/com/ms/square/android/etsyblurdemo/ui/fragment/NavigationDrawerFragment.java | NavigationDrawerFragment.showGlobalContextActionBar | private void showGlobalContextActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(R.string.app_name);
} | java | private void showGlobalContextActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(R.string.app_name);
} | [
"private",
"void",
"showGlobalContextActionBar",
"(",
")",
"{",
"ActionBar",
"actionBar",
"=",
"getActionBar",
"(",
")",
";",
"actionBar",
".",
"setDisplayShowTitleEnabled",
"(",
"true",
")",
";",
"actionBar",
".",
"setTitle",
"(",
"R",
".",
"string",
".",
"ap... | Per the navigation drawer design guidelines, updates the action bar to show the global app
'context', rather than just what's in the current screen. | [
"Per",
"the",
"navigation",
"drawer",
"design",
"guidelines",
"updates",
"the",
"action",
"bar",
"to",
"show",
"the",
"global",
"app",
"context",
"rather",
"than",
"just",
"what",
"s",
"in",
"the",
"current",
"screen",
"."
] | b51c9e80e823fce3590cc061e79e267388b4d8e0 | https://github.com/Manabu-GT/EtsyBlur/blob/b51c9e80e823fce3590cc061e79e267388b4d8e0/sample/src/main/java/com/ms/square/android/etsyblurdemo/ui/fragment/NavigationDrawerFragment.java#L266-L270 |
159,956 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java | UrlsInterface.getGroup | public String getGroup(String groupId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_GROUP);
parameters.put("group_id", groupId);
Response response = transport.get(transport.getPath(), parameters, apiK... | java | public String getGroup(String groupId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_GROUP);
parameters.put("group_id", groupId);
Response response = transport.get(transport.getPath(), parameters, apiK... | [
"public",
"String",
"getGroup",
"(",
"String",
"groupId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",
"(... | Get the group URL for the specified group ID
@param groupId
The group ID
@return The group URL
@throws FlickrException | [
"Get",
"the",
"group",
"URL",
"for",
"the",
"specified",
"group",
"ID"
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java#L65-L78 |
159,957 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java | UrlsInterface.getUserProfile | public String getUserProfile(String userId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_USER_PROFILE);
parameters.put("user_id", userId);
Response response = transport.get(transport.getPath(), parame... | java | public String getUserProfile(String userId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_USER_PROFILE);
parameters.put("user_id", userId);
Response response = transport.get(transport.getPath(), parame... | [
"public",
"String",
"getUserProfile",
"(",
"String",
"userId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",... | Get the URL for the user's profile.
@param userId
The user ID
@return The URL
@throws FlickrException | [
"Get",
"the",
"URL",
"for",
"the",
"user",
"s",
"profile",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java#L111-L124 |
159,958 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java | UrlsInterface.lookupGroup | public Group lookupGroup(String url) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_GROUP);
parameters.put("url", url);
Response response = transport.get(transport.getPath(), parameters, apiKey, shar... | java | public Group lookupGroup(String url) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_GROUP);
parameters.put("url", url);
Response response = transport.get(transport.getPath(), parameters, apiKey, shar... | [
"public",
"Group",
"lookupGroup",
"(",
"String",
"url",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",
"(",... | Lookup the group for the specified URL.
@param url
The url
@return The group
@throws FlickrException | [
"Lookup",
"the",
"group",
"for",
"the",
"specified",
"URL",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java#L134-L151 |
159,959 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java | UrlsInterface.lookupUser | public String lookupUser(String url) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_USER);
parameters.put("url", url);
Response response = transport.get(transport.getPath(), parameters, apiKey, share... | java | public String lookupUser(String url) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_USER);
parameters.put("url", url);
Response response = transport.get(transport.getPath(), parameters, apiKey, share... | [
"public",
"String",
"lookupUser",
"(",
"String",
"url",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",
"(",... | Lookup the username for the specified User URL.
@param url
The user profile URL
@return The username
@throws FlickrException | [
"Lookup",
"the",
"username",
"for",
"the",
"specified",
"User",
"URL",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java#L161-L175 |
159,960 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java | UrlsInterface.lookupGallery | public Gallery lookupGallery(String galleryId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_GALLERY);
parameters.put("url", galleryId);
Response response = transport.get(transport.getPath(), parame... | java | public Gallery lookupGallery(String galleryId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_LOOKUP_GALLERY);
parameters.put("url", galleryId);
Response response = transport.get(transport.getPath(), parame... | [
"public",
"Gallery",
"lookupGallery",
"(",
"String",
"galleryId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"pu... | Lookup the Gallery for the specified ID.
@param galleryId
The user profile URL
@return The Gallery
@throws FlickrException | [
"Lookup",
"the",
"Gallery",
"for",
"the",
"specified",
"ID",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/urls/UrlsInterface.java#L185-L216 |
159,961 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/favorites/FavoritesInterface.java | FavoritesInterface.add | public void add(String photoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ADD);
parameters.put("photo_id", photoId);
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sha... | java | public void add(String photoId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ADD);
parameters.put("photo_id", photoId);
Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sha... | [
"public",
"void",
"add",
"(",
"String",
"photoId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",
"(",
"\... | Add a photo to the user's favorites.
@param photoId
The photo ID
@throws FlickrException | [
"Add",
"a",
"photo",
"to",
"the",
"user",
"s",
"favorites",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/favorites/FavoritesInterface.java#L61-L70 |
159,962 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/favorites/FavoritesInterface.java | FavoritesInterface.getContext | public PhotoContext getContext(String photoId, String userId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_CONTEXT);
parameters.put("photo_id", photoId);
parameters.put("user_id", userId);
Re... | java | public PhotoContext getContext(String photoId, String userId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_CONTEXT);
parameters.put("photo_id", photoId);
parameters.put("user_id", userId);
Re... | [
"public",
"PhotoContext",
"getContext",
"(",
"String",
"photoId",
",",
"String",
"userId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";... | Returns next and previous favorites for a photo in a user's favorites
@param photoId
The photo id
@param userId
The user's ID
@see <a href="http://www.flickr.com/services/api/flickr.favorites.getContext.html">flickr.favorites.getContext</a> | [
"Returns",
"next",
"and",
"previous",
"favorites",
"for",
"a",
"photo",
"in",
"a",
"user",
"s",
"favorites"
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/favorites/FavoritesInterface.java#L203-L234 |
159,963 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/people/PeopleInterface.java | PeopleInterface.editCoords | public void editCoords(String photoId, String userId, Rectangle bounds) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COORDS);
parameters.put("photo_id", photoId);
parameters.put("user_id", userId);
... | java | public void editCoords(String photoId, String userId, Rectangle bounds) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COORDS);
parameters.put("photo_id", photoId);
parameters.put("user_id", userId);
... | [
"public",
"void",
"editCoords",
"(",
"String",
"photoId",
",",
"String",
"userId",
",",
"Rectangle",
"bounds",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",... | Edit the co-ordinates that the user shows in
@param photoId
@param userId
@param bounds
@throws FlickrException | [
"Edit",
"the",
"co",
"-",
"ordinates",
"that",
"the",
"user",
"shows",
"in"
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/people/PeopleInterface.java#L122-L137 |
159,964 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/Flickr.java | Flickr.getAuthInterface | @Override
public AuthInterface getAuthInterface() {
if (authInterface == null) {
authInterface = new AuthInterface(apiKey, sharedSecret, transport);
}
return authInterface;
} | java | @Override
public AuthInterface getAuthInterface() {
if (authInterface == null) {
authInterface = new AuthInterface(apiKey, sharedSecret, transport);
}
return authInterface;
} | [
"@",
"Override",
"public",
"AuthInterface",
"getAuthInterface",
"(",
")",
"{",
"if",
"(",
"authInterface",
"==",
"null",
")",
"{",
"authInterface",
"=",
"new",
"AuthInterface",
"(",
"apiKey",
",",
"sharedSecret",
",",
"transport",
")",
";",
"}",
"return",
"a... | Get the AuthInterface.
@return The AuthInterface | [
"Get",
"the",
"AuthInterface",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L378-L384 |
159,965 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/Flickr.java | Flickr.getActivityInterface | @Override
public ActivityInterface getActivityInterface() {
if (activityInterface == null) {
activityInterface = new ActivityInterface(apiKey, sharedSecret, transport);
}
return activityInterface;
} | java | @Override
public ActivityInterface getActivityInterface() {
if (activityInterface == null) {
activityInterface = new ActivityInterface(apiKey, sharedSecret, transport);
}
return activityInterface;
} | [
"@",
"Override",
"public",
"ActivityInterface",
"getActivityInterface",
"(",
")",
"{",
"if",
"(",
"activityInterface",
"==",
"null",
")",
"{",
"activityInterface",
"=",
"new",
"ActivityInterface",
"(",
"apiKey",
",",
"sharedSecret",
",",
"transport",
")",
";",
"... | Get the ActivityInterface.
@return The ActivityInterface | [
"Get",
"the",
"ActivityInterface",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L391-L397 |
159,966 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/Flickr.java | Flickr.getTagsInterface | @Override
public TagsInterface getTagsInterface() {
if (tagsInterface == null) {
tagsInterface = new TagsInterface(apiKey, sharedSecret, transport);
}
return tagsInterface;
} | java | @Override
public TagsInterface getTagsInterface() {
if (tagsInterface == null) {
tagsInterface = new TagsInterface(apiKey, sharedSecret, transport);
}
return tagsInterface;
} | [
"@",
"Override",
"public",
"TagsInterface",
"getTagsInterface",
"(",
")",
"{",
"if",
"(",
"tagsInterface",
"==",
"null",
")",
"{",
"tagsInterface",
"=",
"new",
"TagsInterface",
"(",
"apiKey",
",",
"sharedSecret",
",",
"transport",
")",
";",
"}",
"return",
"t... | Get the TagsInterface for working with Flickr Tags.
@return The TagsInterface | [
"Get",
"the",
"TagsInterface",
"for",
"working",
"with",
"Flickr",
"Tags",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L583-L589 |
159,967 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/Flickr.java | Flickr.getSuggestionsInterface | @Override
public SuggestionsInterface getSuggestionsInterface() {
if (suggestionsInterface == null) {
suggestionsInterface = new SuggestionsInterface(apiKey, sharedSecret, transport);
}
return suggestionsInterface;
} | java | @Override
public SuggestionsInterface getSuggestionsInterface() {
if (suggestionsInterface == null) {
suggestionsInterface = new SuggestionsInterface(apiKey, sharedSecret, transport);
}
return suggestionsInterface;
} | [
"@",
"Override",
"public",
"SuggestionsInterface",
"getSuggestionsInterface",
"(",
")",
"{",
"if",
"(",
"suggestionsInterface",
"==",
"null",
")",
"{",
"suggestionsInterface",
"=",
"new",
"SuggestionsInterface",
"(",
"apiKey",
",",
"sharedSecret",
",",
"transport",
... | Get the SuggestionsInterface.
@return The SuggestionsInterface | [
"Get",
"the",
"SuggestionsInterface",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L660-L666 |
159,968 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/Flickr.java | Flickr.getDiscussionInterface | @Override
public GroupDiscussInterface getDiscussionInterface() {
if (discussionInterface == null) {
discussionInterface = new GroupDiscussInterface(apiKey, sharedSecret, transport);
}
return discussionInterface;
} | java | @Override
public GroupDiscussInterface getDiscussionInterface() {
if (discussionInterface == null) {
discussionInterface = new GroupDiscussInterface(apiKey, sharedSecret, transport);
}
return discussionInterface;
} | [
"@",
"Override",
"public",
"GroupDiscussInterface",
"getDiscussionInterface",
"(",
")",
"{",
"if",
"(",
"discussionInterface",
"==",
"null",
")",
"{",
"discussionInterface",
"=",
"new",
"GroupDiscussInterface",
"(",
"apiKey",
",",
"sharedSecret",
",",
"transport",
"... | Get the GroupDiscussInterface.
@return The GroupDiscussInterface | [
"Get",
"the",
"GroupDiscussInterface",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/Flickr.java#L674-L680 |
159,969 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java | BlogsInterface.getServices | public Collection<Service> getServices() throws FlickrException {
List<Service> list = new ArrayList<Service>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_SERVICES);
Response response = transportAPI.get(transportAPI.getPath(... | java | public Collection<Service> getServices() throws FlickrException {
List<Service> list = new ArrayList<Service>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_SERVICES);
Response response = transportAPI.get(transportAPI.getPath(... | [
"public",
"Collection",
"<",
"Service",
">",
"getServices",
"(",
")",
"throws",
"FlickrException",
"{",
"List",
"<",
"Service",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"Service",
">",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"parameter... | Return a list of Flickr supported blogging services.
This method does not require authentication.
@return List of Services
@throws FlickrException | [
"Return",
"a",
"list",
"of",
"Flickr",
"supported",
"blogging",
"services",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java#L53-L72 |
159,970 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java | BlogsInterface.postPhoto | public void postPhoto(Photo photo, String blogId, String blogPassword) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_POST_PHOTO);
parameters.put("blog_id", blogId);
parameters.put("photo_id", photo.getId());... | java | public void postPhoto(Photo photo, String blogId, String blogPassword) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_POST_PHOTO);
parameters.put("blog_id", blogId);
parameters.put("photo_id", photo.getId());... | [
"public",
"void",
"postPhoto",
"(",
"Photo",
"photo",
",",
"String",
"blogId",
",",
"String",
"blogPassword",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
... | Post the specified photo to a blog. Note that the Photo.title and Photo.description are used for the blog entry title and body respectively.
@param photo
The photo metadata
@param blogId
The blog ID
@param blogPassword
The blog password
@throws FlickrException | [
"Post",
"the",
"specified",
"photo",
"to",
"a",
"blog",
".",
"Note",
"that",
"the",
"Photo",
".",
"title",
"and",
"Photo",
".",
"description",
"are",
"used",
"for",
"the",
"blog",
"entry",
"title",
"and",
"body",
"respectively",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java#L85-L101 |
159,971 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java | BlogsInterface.postPhoto | public void postPhoto(Photo photo, String blogId) throws FlickrException {
postPhoto(photo, blogId, null);
} | java | public void postPhoto(Photo photo, String blogId) throws FlickrException {
postPhoto(photo, blogId, null);
} | [
"public",
"void",
"postPhoto",
"(",
"Photo",
"photo",
",",
"String",
"blogId",
")",
"throws",
"FlickrException",
"{",
"postPhoto",
"(",
"photo",
",",
"blogId",
",",
"null",
")",
";",
"}"
] | Post the specified photo to a blog.
@param photo
The photo metadata
@param blogId
The blog ID
@throws FlickrException | [
"Post",
"the",
"specified",
"photo",
"to",
"a",
"blog",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java#L112-L114 |
159,972 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java | BlogsInterface.getList | public Collection<Blog> getList() throws FlickrException {
List<Blog> blogs = new ArrayList<Blog>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_LIST);
Response response = transportAPI.post(transportAPI.getPath(), parameters... | java | public Collection<Blog> getList() throws FlickrException {
List<Blog> blogs = new ArrayList<Blog>();
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_GET_LIST);
Response response = transportAPI.post(transportAPI.getPath(), parameters... | [
"public",
"Collection",
"<",
"Blog",
">",
"getList",
"(",
")",
"throws",
"FlickrException",
"{",
"List",
"<",
"Blog",
">",
"blogs",
"=",
"new",
"ArrayList",
"<",
"Blog",
">",
"(",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
... | Get the collection of configured blogs for the calling user.
@return The Collection of configured blogs | [
"Get",
"the",
"collection",
"of",
"configured",
"blogs",
"for",
"the",
"calling",
"user",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/blogs/BlogsInterface.java#L121-L144 |
159,973 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/PhotoUtils.java | PhotoUtils.getAttribute | private static String getAttribute(String name, Element firstElement, Element secondElement) {
String val = firstElement.getAttribute(name);
if (val.length() == 0 && secondElement != null) {
val = secondElement.getAttribute(name);
}
return val;
} | java | private static String getAttribute(String name, Element firstElement, Element secondElement) {
String val = firstElement.getAttribute(name);
if (val.length() == 0 && secondElement != null) {
val = secondElement.getAttribute(name);
}
return val;
} | [
"private",
"static",
"String",
"getAttribute",
"(",
"String",
"name",
",",
"Element",
"firstElement",
",",
"Element",
"secondElement",
")",
"{",
"String",
"val",
"=",
"firstElement",
".",
"getAttribute",
"(",
"name",
")",
";",
"if",
"(",
"val",
".",
"length"... | Try to get an attribute value from two elements.
@param firstElement
@param secondElement
@return attribute value | [
"Try",
"to",
"get",
"an",
"attribute",
"value",
"from",
"two",
"elements",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/PhotoUtils.java#L33-L39 |
159,974 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/PhotoUtils.java | PhotoUtils.createPhotoList | public static final PhotoList<Photo> createPhotoList(Element photosElement) {
PhotoList<Photo> photos = new PhotoList<Photo>();
photos.setPage(photosElement.getAttribute("page"));
photos.setPages(photosElement.getAttribute("pages"));
photos.setPerPage(photosElement.getAttribute("perp... | java | public static final PhotoList<Photo> createPhotoList(Element photosElement) {
PhotoList<Photo> photos = new PhotoList<Photo>();
photos.setPage(photosElement.getAttribute("page"));
photos.setPages(photosElement.getAttribute("pages"));
photos.setPerPage(photosElement.getAttribute("perp... | [
"public",
"static",
"final",
"PhotoList",
"<",
"Photo",
">",
"createPhotoList",
"(",
"Element",
"photosElement",
")",
"{",
"PhotoList",
"<",
"Photo",
">",
"photos",
"=",
"new",
"PhotoList",
"<",
"Photo",
">",
"(",
")",
";",
"photos",
".",
"setPage",
"(",
... | Parse a list of Photos from given Element.
@param photosElement
@return PhotoList | [
"Parse",
"a",
"list",
"of",
"Photos",
"from",
"given",
"Element",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/PhotoUtils.java#L502-L515 |
159,975 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.getRequestToken | public OAuth1RequestToken getRequestToken(String callbackUrl) {
String callback = (callbackUrl != null) ? callbackUrl : OUT_OF_BOUND_AUTH_METHOD;
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.callback(callback)
.buil... | java | public OAuth1RequestToken getRequestToken(String callbackUrl) {
String callback = (callbackUrl != null) ? callbackUrl : OUT_OF_BOUND_AUTH_METHOD;
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.callback(callback)
.buil... | [
"public",
"OAuth1RequestToken",
"getRequestToken",
"(",
"String",
"callbackUrl",
")",
"{",
"String",
"callback",
"=",
"(",
"callbackUrl",
"!=",
"null",
")",
"?",
"callbackUrl",
":",
"OUT_OF_BOUND_AUTH_METHOD",
";",
"OAuth10aService",
"service",
"=",
"new",
"ServiceB... | Get the OAuth request token - this is step one of authorization.
@param callbackUrl
optional callback URL - required for web auth flow, will be set to "oob" if not specified.
@return the {@link OAuth1RequestToken}, store this for when the user returns from the Flickr website. | [
"Get",
"the",
"OAuth",
"request",
"token",
"-",
"this",
"is",
"step",
"one",
"of",
"authorization",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L88-L101 |
159,976 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.getAuthorizationUrl | public String getAuthorizationUrl(OAuth1RequestToken oAuthRequestToken, Permission permission) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
String authorizationUrl = service.getAuthorizationUrl(oAuthRe... | java | public String getAuthorizationUrl(OAuth1RequestToken oAuthRequestToken, Permission permission) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
String authorizationUrl = service.getAuthorizationUrl(oAuthRe... | [
"public",
"String",
"getAuthorizationUrl",
"(",
"OAuth1RequestToken",
"oAuthRequestToken",
",",
"Permission",
"permission",
")",
"{",
"OAuth10aService",
"service",
"=",
"new",
"ServiceBuilder",
"(",
"apiKey",
")",
".",
"apiSecret",
"(",
"sharedSecret",
")",
".",
"bu... | Get the auth URL, this is step two of authorization.
@param oAuthRequestToken
the token from a {@link AuthInterface#getRequestToken} call. | [
"Get",
"the",
"auth",
"URL",
"this",
"is",
"step",
"two",
"of",
"authorization",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L109-L116 |
159,977 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.getAccessToken | @SuppressWarnings("boxing")
public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
// Flickr seems to return invalid ... | java | @SuppressWarnings("boxing")
public OAuth1Token getAccessToken(OAuth1RequestToken oAuthRequestToken, String verifier) {
OAuth10aService service = new ServiceBuilder(apiKey)
.apiSecret(sharedSecret)
.build(FlickrApi.instance());
// Flickr seems to return invalid ... | [
"@",
"SuppressWarnings",
"(",
"\"boxing\"",
")",
"public",
"OAuth1Token",
"getAccessToken",
"(",
"OAuth1RequestToken",
"oAuthRequestToken",
",",
"String",
"verifier",
")",
"{",
"OAuth10aService",
"service",
"=",
"new",
"ServiceBuilder",
"(",
"apiKey",
")",
".",
"api... | Trade the request token for an access token, this is step three of authorization.
@param oAuthRequestToken
this is the token returned by the {@link AuthInterface#getRequestToken} call.
@param verifier | [
"Trade",
"the",
"request",
"token",
"for",
"an",
"access",
"token",
"this",
"is",
"step",
"three",
"of",
"authorization",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L124-L154 |
159,978 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.exchangeAuthToken | public OAuth1RequestToken exchangeAuthToken(String authToken) throws FlickrException {
// Use TreeMap so keys are automatically sorted alphabetically
Map<String, String> parameters = new TreeMap<String, String>();
parameters.put("method", METHOD_EXCHANGE_TOKEN);
parameters.put(Flic... | java | public OAuth1RequestToken exchangeAuthToken(String authToken) throws FlickrException {
// Use TreeMap so keys are automatically sorted alphabetically
Map<String, String> parameters = new TreeMap<String, String>();
parameters.put("method", METHOD_EXCHANGE_TOKEN);
parameters.put(Flic... | [
"public",
"OAuth1RequestToken",
"exchangeAuthToken",
"(",
"String",
"authToken",
")",
"throws",
"FlickrException",
"{",
"// Use TreeMap so keys are automatically sorted alphabetically\r",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
"=",
"new",
"TreeMap",
"<",
... | Exchange an auth token from the old Authentication API, to an OAuth access token.
Calling this method will delete the auth token used to make the request.
@param authToken
@throws FlickrException
@see "http://www.flickr.com/services/api/flickr.auth.oauth.getAccessToken.html" | [
"Exchange",
"an",
"auth",
"token",
"from",
"the",
"old",
"Authentication",
"API",
"to",
"an",
"OAuth",
"access",
"token",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L205-L222 |
159,979 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.constructToken | private OAuth1RequestToken constructToken(Response response) {
Element authElement = response.getPayload();
String oauthToken = XMLUtilities.getChildValue(authElement, "oauth_token");
String oauthTokenSecret = XMLUtilities.getChildValue(authElement, "oauth_token_secret");
OAuth1Req... | java | private OAuth1RequestToken constructToken(Response response) {
Element authElement = response.getPayload();
String oauthToken = XMLUtilities.getChildValue(authElement, "oauth_token");
String oauthTokenSecret = XMLUtilities.getChildValue(authElement, "oauth_token_secret");
OAuth1Req... | [
"private",
"OAuth1RequestToken",
"constructToken",
"(",
"Response",
"response",
")",
"{",
"Element",
"authElement",
"=",
"response",
".",
"getPayload",
"(",
")",
";",
"String",
"oauthToken",
"=",
"XMLUtilities",
".",
"getChildValue",
"(",
"authElement",
",",
"\"oa... | Construct a Access Token from a Flickr Response.
@param response | [
"Construct",
"a",
"Access",
"Token",
"from",
"a",
"Flickr",
"Response",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L251-L258 |
159,980 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/auth/AuthInterface.java | AuthInterface.getSignature | private String getSignature(String sharedSecret, Map<String, String> params) {
StringBuffer buffer = new StringBuffer();
buffer.append(sharedSecret);
for (Map.Entry<String, String> entry : params.entrySet()) {
buffer.append(entry.getKey());
buffer.append(entry.getVal... | java | private String getSignature(String sharedSecret, Map<String, String> params) {
StringBuffer buffer = new StringBuffer();
buffer.append(sharedSecret);
for (Map.Entry<String, String> entry : params.entrySet()) {
buffer.append(entry.getKey());
buffer.append(entry.getVal... | [
"private",
"String",
"getSignature",
"(",
"String",
"sharedSecret",
",",
"Map",
"<",
"String",
",",
"String",
">",
"params",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"sharedSecret",
")",
"... | Get a signature for a list of parameters using the given shared secret.
@param sharedSecret
The shared secret
@param params
The parameters
@return The signature String | [
"Get",
"a",
"signature",
"for",
"a",
"list",
"of",
"parameters",
"using",
"the",
"given",
"shared",
"secret",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/auth/AuthInterface.java#L269-L285 |
159,981 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/util/UrlUtilities.java | UrlUtilities.buildUrl | @Deprecated
public static URL buildUrl(String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
return buildUrl("http", port, path, parameters);
} | java | @Deprecated
public static URL buildUrl(String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
return buildUrl("http", port, path, parameters);
} | [
"@",
"Deprecated",
"public",
"static",
"URL",
"buildUrl",
"(",
"String",
"host",
",",
"int",
"port",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"throws",
"MalformedURLException",
"{",
"return",
"buildUrl",
"(",
... | Build a request URL.
@param host
The host
@param port
The port
@param path
The path
@param parameters
The parameters
@return The URL
@throws MalformedURLException
@deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) } | [
"Build",
"a",
"request",
"URL",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/UrlUtilities.java#L34-L37 |
159,982 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/util/UrlUtilities.java | UrlUtilities.buildUrl | public static URL buildUrl(String scheme, String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
checkSchemeAndPort(scheme, port);
StringBuilder buffer = new StringBuilder();
if (!host.startsWith(scheme + "://")) {
buffer.append(scheme)... | java | public static URL buildUrl(String scheme, String host, int port, String path, Map<String, String> parameters) throws MalformedURLException {
checkSchemeAndPort(scheme, port);
StringBuilder buffer = new StringBuilder();
if (!host.startsWith(scheme + "://")) {
buffer.append(scheme)... | [
"public",
"static",
"URL",
"buildUrl",
"(",
"String",
"scheme",
",",
"String",
"host",
",",
"int",
"port",
",",
"String",
"path",
",",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"throws",
"MalformedURLException",
"{",
"checkSchemeAndPort",
... | Build a request URL using a given scheme.
@param scheme the scheme, either {@code http} or {@code https}
@param host
The host
@param port
The port
@param path
The path
@param parameters
The parameters
@return The URL
@throws MalformedURLException | [
"Build",
"a",
"request",
"URL",
"using",
"a",
"given",
"scheme",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/UrlUtilities.java#L54-L98 |
159,983 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/Uploader.java | Uploader.upload | @Override
public String upload(byte[] data, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(data);
return sendUploadRequest(metaData, payload);
} | java | @Override
public String upload(byte[] data, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(data);
return sendUploadRequest(metaData, payload);
} | [
"@",
"Override",
"public",
"String",
"upload",
"(",
"byte",
"[",
"]",
"data",
",",
"UploadMetaData",
"metaData",
")",
"throws",
"FlickrException",
"{",
"Payload",
"payload",
"=",
"new",
"Payload",
"(",
"data",
")",
";",
"return",
"sendUploadRequest",
"(",
"m... | Upload a photo from a byte-array.
@param data
The photo data as a byte array
@param metaData
The meta data
@return photoId or ticketId
@throws FlickrException | [
"Upload",
"a",
"photo",
"from",
"a",
"byte",
"-",
"array",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L74-L78 |
159,984 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/Uploader.java | Uploader.upload | @Override
public String upload(File file, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(file);
return sendUploadRequest(metaData, payload);
} | java | @Override
public String upload(File file, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(file);
return sendUploadRequest(metaData, payload);
} | [
"@",
"Override",
"public",
"String",
"upload",
"(",
"File",
"file",
",",
"UploadMetaData",
"metaData",
")",
"throws",
"FlickrException",
"{",
"Payload",
"payload",
"=",
"new",
"Payload",
"(",
"file",
")",
";",
"return",
"sendUploadRequest",
"(",
"metaData",
",... | Upload a photo from a File.
@param file
the photo file
@param metaData
The meta data
@return photoId or ticketId
@throws FlickrException | [
"Upload",
"a",
"photo",
"from",
"a",
"File",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L90-L94 |
159,985 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/Uploader.java | Uploader.upload | @Override
public String upload(InputStream in, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(in);
return sendUploadRequest(metaData, payload);
} | java | @Override
public String upload(InputStream in, UploadMetaData metaData) throws FlickrException {
Payload payload = new Payload(in);
return sendUploadRequest(metaData, payload);
} | [
"@",
"Override",
"public",
"String",
"upload",
"(",
"InputStream",
"in",
",",
"UploadMetaData",
"metaData",
")",
"throws",
"FlickrException",
"{",
"Payload",
"payload",
"=",
"new",
"Payload",
"(",
"in",
")",
";",
"return",
"sendUploadRequest",
"(",
"metaData",
... | Upload a photo from an InputStream.
@param in
@param metaData
@return photoId or ticketId
@throws FlickrException | [
"Upload",
"a",
"photo",
"from",
"an",
"InputStream",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L104-L108 |
159,986 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/Uploader.java | Uploader.replace | @Override
public String replace(File file, String flickrId, boolean async) throws FlickrException {
Payload payload = new Payload(file, flickrId);
return sendReplaceRequest(async, payload);
} | java | @Override
public String replace(File file, String flickrId, boolean async) throws FlickrException {
Payload payload = new Payload(file, flickrId);
return sendReplaceRequest(async, payload);
} | [
"@",
"Override",
"public",
"String",
"replace",
"(",
"File",
"file",
",",
"String",
"flickrId",
",",
"boolean",
"async",
")",
"throws",
"FlickrException",
"{",
"Payload",
"payload",
"=",
"new",
"Payload",
"(",
"file",
",",
"flickrId",
")",
";",
"return",
"... | Replace a photo from a File.
@param file
@param flickrId
@param async
@return photoId or ticketId
@throws FlickrException | [
"Replace",
"a",
"photo",
"from",
"a",
"File",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L147-L151 |
159,987 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/Uploader.java | Uploader.getResponseString | private String getResponseString(boolean async, UploaderResponse response) {
return async ? response.getTicketId() : response.getPhotoId();
} | java | private String getResponseString(boolean async, UploaderResponse response) {
return async ? response.getTicketId() : response.getPhotoId();
} | [
"private",
"String",
"getResponseString",
"(",
"boolean",
"async",
",",
"UploaderResponse",
"response",
")",
"{",
"return",
"async",
"?",
"response",
".",
"getTicketId",
"(",
")",
":",
"response",
".",
"getPhotoId",
"(",
")",
";",
"}"
] | Get the photo or ticket id from the response.
@param async
@param response
@return | [
"Get",
"the",
"photo",
"or",
"ticket",
"id",
"from",
"the",
"response",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L178-L180 |
159,988 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.setViews | @Deprecated
public void setViews(String views) {
if (views != null) {
try {
setViews(Integer.parseInt(views));
} catch (NumberFormatException e) {
setViews(-1);
}
}
} | java | @Deprecated
public void setViews(String views) {
if (views != null) {
try {
setViews(Integer.parseInt(views));
} catch (NumberFormatException e) {
setViews(-1);
}
}
} | [
"@",
"Deprecated",
"public",
"void",
"setViews",
"(",
"String",
"views",
")",
"{",
"if",
"(",
"views",
"!=",
"null",
")",
"{",
"try",
"{",
"setViews",
"(",
"Integer",
".",
"parseInt",
"(",
"views",
")",
")",
";",
"}",
"catch",
"(",
"NumberFormatExcepti... | Sets the number of views for this Photo. For un-authenticated calls this value is not available and will be set to -1.
@param views
@deprecated attribute no longer available | [
"Sets",
"the",
"number",
"of",
"views",
"for",
"this",
"Photo",
".",
"For",
"un",
"-",
"authenticated",
"calls",
"this",
"value",
"is",
"not",
"available",
"and",
"will",
"be",
"set",
"to",
"-",
"1",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L461-L470 |
159,989 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.setRotation | public void setRotation(String rotation) {
if (rotation != null) {
try {
setRotation(Integer.parseInt(rotation));
} catch (NumberFormatException e) {
setRotation(-1);
}
}
} | java | public void setRotation(String rotation) {
if (rotation != null) {
try {
setRotation(Integer.parseInt(rotation));
} catch (NumberFormatException e) {
setRotation(-1);
}
}
} | [
"public",
"void",
"setRotation",
"(",
"String",
"rotation",
")",
"{",
"if",
"(",
"rotation",
"!=",
"null",
")",
"{",
"try",
"{",
"setRotation",
"(",
"Integer",
".",
"parseInt",
"(",
"rotation",
")",
")",
";",
"}",
"catch",
"(",
"NumberFormatException",
"... | Set the degrees of rotation. Value will be set to -1, if not available.
@param rotation | [
"Set",
"the",
"degrees",
"of",
"rotation",
".",
"Value",
"will",
"be",
"set",
"to",
"-",
"1",
"if",
"not",
"available",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L498-L506 |
159,990 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.getOriginalAsStream | @Deprecated
public InputStream getOriginalAsStream() throws IOException, FlickrException {
if (originalFormat != null) {
return getOriginalImageAsStream("_o." + originalFormat);
}
return getOriginalImageAsStream(DEFAULT_ORIGINAL_IMAGE_SUFFIX);
} | java | @Deprecated
public InputStream getOriginalAsStream() throws IOException, FlickrException {
if (originalFormat != null) {
return getOriginalImageAsStream("_o." + originalFormat);
}
return getOriginalImageAsStream(DEFAULT_ORIGINAL_IMAGE_SUFFIX);
} | [
"@",
"Deprecated",
"public",
"InputStream",
"getOriginalAsStream",
"(",
")",
"throws",
"IOException",
",",
"FlickrException",
"{",
"if",
"(",
"originalFormat",
"!=",
"null",
")",
"{",
"return",
"getOriginalImageAsStream",
"(",
"\"_o.\"",
"+",
"originalFormat",
")",
... | Get an InputStream for the original image. Callers must close the stream upon completion.
@deprecated
@see PhotosInterface#getImageAsStream(Photo, int)
@return The InputStream
@throws IOException | [
"Get",
"an",
"InputStream",
"for",
"the",
"original",
"image",
".",
"Callers",
"must",
"close",
"the",
"stream",
"upon",
"completion",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L591-L597 |
159,991 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.getOriginalUrl | public String getOriginalUrl() throws FlickrException {
if (originalSize == null) {
if (originalFormat != null) {
return getOriginalBaseImageUrl() + "_o." + originalFormat;
}
return getOriginalBaseImageUrl() + DEFAULT_ORIGINAL_IMAGE_SUFFIX;
} els... | java | public String getOriginalUrl() throws FlickrException {
if (originalSize == null) {
if (originalFormat != null) {
return getOriginalBaseImageUrl() + "_o." + originalFormat;
}
return getOriginalBaseImageUrl() + DEFAULT_ORIGINAL_IMAGE_SUFFIX;
} els... | [
"public",
"String",
"getOriginalUrl",
"(",
")",
"throws",
"FlickrException",
"{",
"if",
"(",
"originalSize",
"==",
"null",
")",
"{",
"if",
"(",
"originalFormat",
"!=",
"null",
")",
"{",
"return",
"getOriginalBaseImageUrl",
"(",
")",
"+",
"\"_o.\"",
"+",
"ori... | Get the original image URL.
@return The original image URL | [
"Get",
"the",
"original",
"image",
"URL",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L604-L613 |
159,992 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.getImage | @Deprecated
private BufferedImage getImage(String suffix) throws IOException {
StringBuffer buffer = getBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | java | @Deprecated
private BufferedImage getImage(String suffix) throws IOException {
StringBuffer buffer = getBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | [
"@",
"Deprecated",
"private",
"BufferedImage",
"getImage",
"(",
"String",
"suffix",
")",
"throws",
"IOException",
"{",
"StringBuffer",
"buffer",
"=",
"getBaseImageUrl",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"suffix",
")",
";",
"return",
"_getImage",
"("... | Get an image using the specified URL suffix.
@deprecated
@param suffix
The URL suffix, including the .extension
@return The BufferedImage object
@throws IOException | [
"Get",
"an",
"image",
"using",
"the",
"specified",
"URL",
"suffix",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L865-L870 |
159,993 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.getOriginalImage | @Deprecated
private BufferedImage getOriginalImage(String suffix) throws IOException, FlickrException {
StringBuffer buffer = getOriginalBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | java | @Deprecated
private BufferedImage getOriginalImage(String suffix) throws IOException, FlickrException {
StringBuffer buffer = getOriginalBaseImageUrl();
buffer.append(suffix);
return _getImage(buffer.toString());
} | [
"@",
"Deprecated",
"private",
"BufferedImage",
"getOriginalImage",
"(",
"String",
"suffix",
")",
"throws",
"IOException",
",",
"FlickrException",
"{",
"StringBuffer",
"buffer",
"=",
"getOriginalBaseImageUrl",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"suffix",
... | Get the original-image using the specified URL suffix.
@deprecated
@see PhotosInterface#getImage(Photo, int)
@param suffix
The URL suffix, including the .extension
@return The BufferedImage object
@throws IOException
@throws FlickrException | [
"Get",
"the",
"original",
"-",
"image",
"using",
"the",
"specified",
"URL",
"suffix",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L883-L888 |
159,994 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.getImageAsStream | @Deprecated
private InputStream getImageAsStream(String suffix) throws IOException {
StringBuffer buffer = getBaseImageUrl();
buffer.append(suffix);
return _getImageAsStream(buffer.toString());
} | java | @Deprecated
private InputStream getImageAsStream(String suffix) throws IOException {
StringBuffer buffer = getBaseImageUrl();
buffer.append(suffix);
return _getImageAsStream(buffer.toString());
} | [
"@",
"Deprecated",
"private",
"InputStream",
"getImageAsStream",
"(",
"String",
"suffix",
")",
"throws",
"IOException",
"{",
"StringBuffer",
"buffer",
"=",
"getBaseImageUrl",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"suffix",
")",
";",
"return",
"_getImageAs... | Get an image as a stream. Callers must be sure to close the stream when they are done with it.
@deprecated
@see PhotosInterface#getImageAsStream(Photo, int)
@param suffix
The suffix
@return The InputStream
@throws IOException | [
"Get",
"an",
"image",
"as",
"a",
"stream",
".",
"Callers",
"must",
"be",
"sure",
"to",
"close",
"the",
"stream",
"when",
"they",
"are",
"done",
"with",
"it",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L920-L925 |
159,995 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/Photo.java | Photo.setSizes | public void setSizes(Collection<Size> sizes) {
for (Size size : sizes) {
if (size.getLabel() == Size.SMALL) {
smallSize = size;
} else if (size.getLabel() == Size.SQUARE) {
squareSize = size;
} else if (size.getLabel() == Size.THUMB) {
... | java | public void setSizes(Collection<Size> sizes) {
for (Size size : sizes) {
if (size.getLabel() == Size.SMALL) {
smallSize = size;
} else if (size.getLabel() == Size.SQUARE) {
squareSize = size;
} else if (size.getLabel() == Size.THUMB) {
... | [
"public",
"void",
"setSizes",
"(",
"Collection",
"<",
"Size",
">",
"sizes",
")",
"{",
"for",
"(",
"Size",
"size",
":",
"sizes",
")",
"{",
"if",
"(",
"size",
".",
"getLabel",
"(",
")",
"==",
"Size",
".",
"SMALL",
")",
"{",
"smallSize",
"=",
"size",
... | Set sizes to override the generated URLs of the different sizes.
@param sizes
@see com.flickr4java.flickr.photos.PhotosInterface#getSizes(String) | [
"Set",
"sizes",
"to",
"override",
"the",
"generated",
"URLs",
"of",
"the",
"different",
"sizes",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/Photo.java#L1044-L1084 |
159,996 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/transform/TransformInterface.java | TransformInterface.rotate | public void rotate(String photoId, int degrees) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ROTATE);
parameters.put("photo_id", photoId);
parameters.put("degrees", String.valueOf(degrees));
Resp... | java | public void rotate(String photoId, int degrees) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_ROTATE);
parameters.put("photo_id", photoId);
parameters.put("degrees", String.valueOf(degrees));
Resp... | [
"public",
"void",
"rotate",
"(",
"String",
"photoId",
",",
"int",
"degrees",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"paramete... | Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.
@param photoId
The photo ID
@param degrees
The degrees to rotate (90, 170 or 270) | [
"Rotate",
"the",
"specified",
"photo",
".",
"The",
"only",
"allowed",
"values",
"for",
"degrees",
"are",
"90",
"180",
"and",
"270",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/transform/TransformInterface.java#L40-L51 |
159,997 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/uploader/UploadMetaData.java | UploadMetaData.getUploadParameters | public Map<String, String> getUploadParameters() {
Map<String, String> parameters = new TreeMap<>();
String title = getTitle();
if (title != null) {
parameters.put("title", title);
}
String description = getDescription();
if (description != null) ... | java | public Map<String, String> getUploadParameters() {
Map<String, String> parameters = new TreeMap<>();
String title = getTitle();
if (title != null) {
parameters.put("title", title);
}
String description = getDescription();
if (description != null) ... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getUploadParameters",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
"=",
"new",
"TreeMap",
"<>",
"(",
")",
";",
"String",
"title",
"=",
"getTitle",
"(",
")",
";",
"if",
"("... | Get the upload parameters.
@return | [
"Get",
"the",
"upload",
"parameters",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/UploadMetaData.java#L227-L268 |
159,998 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java | CommentsInterface.deleteComment | public void deleteComment(String commentId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_DELETE_COMMENT);
parameters.put("comment_id", commentId);
// Note: This method requires an HTTP POST request.
... | java | public void deleteComment(String commentId) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_DELETE_COMMENT);
parameters.put("comment_id", commentId);
// Note: This method requires an HTTP POST request.
... | [
"public",
"void",
"deleteComment",
"(",
"String",
"commentId",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"parameters",
".",
"put",... | Delete a comment as the currently authenticated user.
This method requires authentication with 'write' permission.
@param commentId
The id of the comment to delete.
@throws FlickrException | [
"Delete",
"a",
"comment",
"as",
"the",
"currently",
"authenticated",
"user",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java#L89-L102 |
159,999 | boncey/Flickr4Java | src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java | CommentsInterface.editComment | public void editComment(String commentId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COMMENT);
parameters.put("comment_id", commentId);
parameters.put("comment_text", commentText)... | java | public void editComment(String commentId, String commentText) throws FlickrException {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("method", METHOD_EDIT_COMMENT);
parameters.put("comment_id", commentId);
parameters.put("comment_text", commentText)... | [
"public",
"void",
"editComment",
"(",
"String",
"commentId",
",",
"String",
"commentText",
")",
"throws",
"FlickrException",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";... | Edit the text of a comment as the currently authenticated user.
This method requires authentication with 'write' permission.
@param commentId
The id of the comment to edit.
@param commentText
Update the comment to this text.
@throws FlickrException | [
"Edit",
"the",
"text",
"of",
"a",
"comment",
"as",
"the",
"currently",
"authenticated",
"user",
"."
] | f66987ba0e360e5fb7730efbbb8c51f3d978fc25 | https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/comments/CommentsInterface.java#L115-L129 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.