001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (https://www.swig.org). 003 * Version 4.1.1 004 * 005 * Do not make changes to this file unless you know what you are doing - modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.quantlib; 010 011public final class Compounding { 012 public final static Compounding Simple = new Compounding("Simple"); 013 public final static Compounding Compounded = new Compounding("Compounded"); 014 public final static Compounding Continuous = new Compounding("Continuous"); 015 public final static Compounding SimpleThenCompounded = new Compounding("SimpleThenCompounded"); 016 public final static Compounding CompoundedThenSimple = new Compounding("CompoundedThenSimple"); 017 018 public final int swigValue() { 019 return swigValue; 020 } 021 022 public String toString() { 023 return swigName; 024 } 025 026 public static Compounding swigToEnum(int swigValue) { 027 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 028 return swigValues[swigValue]; 029 for (int i = 0; i < swigValues.length; i++) 030 if (swigValues[i].swigValue == swigValue) 031 return swigValues[i]; 032 throw new IllegalArgumentException("No enum " + Compounding.class + " with value " + swigValue); 033 } 034 035 private Compounding(String swigName) { 036 this.swigName = swigName; 037 this.swigValue = swigNext++; 038 } 039 040 private Compounding(String swigName, int swigValue) { 041 this.swigName = swigName; 042 this.swigValue = swigValue; 043 swigNext = swigValue+1; 044 } 045 046 private Compounding(String swigName, Compounding swigEnum) { 047 this.swigName = swigName; 048 this.swigValue = swigEnum.swigValue; 049 swigNext = this.swigValue+1; 050 } 051 052 private static Compounding[] swigValues = { Simple, Compounded, Continuous, SimpleThenCompounded, CompoundedThenSimple }; 053 private static int swigNext = 0; 054 private final int swigValue; 055 private final String swigName; 056} 057