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 VolatilityType { 012 public final static VolatilityType ShiftedLognormal = new VolatilityType("ShiftedLognormal"); 013 public final static VolatilityType Normal = new VolatilityType("Normal"); 014 015 public final int swigValue() { 016 return swigValue; 017 } 018 019 public String toString() { 020 return swigName; 021 } 022 023 public static VolatilityType swigToEnum(int swigValue) { 024 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) 025 return swigValues[swigValue]; 026 for (int i = 0; i < swigValues.length; i++) 027 if (swigValues[i].swigValue == swigValue) 028 return swigValues[i]; 029 throw new IllegalArgumentException("No enum " + VolatilityType.class + " with value " + swigValue); 030 } 031 032 private VolatilityType(String swigName) { 033 this.swigName = swigName; 034 this.swigValue = swigNext++; 035 } 036 037 private VolatilityType(String swigName, int swigValue) { 038 this.swigName = swigName; 039 this.swigValue = swigValue; 040 swigNext = swigValue+1; 041 } 042 043 private VolatilityType(String swigName, VolatilityType swigEnum) { 044 this.swigName = swigName; 045 this.swigValue = swigEnum.swigValue; 046 swigNext = this.swigValue+1; 047 } 048 049 private static VolatilityType[] swigValues = { ShiftedLognormal, Normal }; 050 private static int swigNext = 0; 051 private final int swigValue; 052 private final String swigName; 053} 054