~ubuntu-branches/ubuntu/vivid/quantlib-swig/vivid

« back to all changes in this revision

Viewing changes to Java/org/quantlib/CapVolatilityStructure.java

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2007-12-26 08:10:08 UTC
  • mfrom: (1.1.6 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20071226081008-cjq979mvtxydli4r
New upstream release 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ----------------------------------------------------------------------------
2
 
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version 1.3.31
4
 
 *
5
 
 * Do not make changes to this file unless you know what you are doing--modify
6
 
 * the SWIG interface file instead.
7
 
 * ----------------------------------------------------------------------------- */
8
 
 
9
 
package org.quantlib;
10
 
 
11
 
public class CapVolatilityStructure {
12
 
  private long swigCPtr;
13
 
  protected boolean swigCMemOwn;
14
 
 
15
 
  protected CapVolatilityStructure(long cPtr, boolean cMemoryOwn) {
16
 
    swigCMemOwn = cMemoryOwn;
17
 
    swigCPtr = cPtr;
18
 
  }
19
 
 
20
 
  protected static long getCPtr(CapVolatilityStructure obj) {
21
 
    return (obj == null) ? 0 : obj.swigCPtr;
22
 
  }
23
 
 
24
 
  protected void finalize() {
25
 
    delete();
26
 
  }
27
 
 
28
 
  public synchronized void delete() {
29
 
    if(swigCPtr != 0 && swigCMemOwn) {
30
 
      swigCMemOwn = false;
31
 
      QuantLibJNI.delete_CapVolatilityStructure(swigCPtr);
32
 
    }
33
 
    swigCPtr = 0;
34
 
  }
35
 
 
36
 
  public SWIGTYPE_p_CapVolatilityStructure __deref__() {
37
 
    long cPtr = QuantLibJNI.CapVolatilityStructure___deref__(swigCPtr, this);
38
 
    return (cPtr == 0) ? null : new SWIGTYPE_p_CapVolatilityStructure(cPtr, false);
39
 
  }
40
 
 
41
 
  public boolean isNull() {
42
 
    return QuantLibJNI.CapVolatilityStructure_isNull(swigCPtr, this);
43
 
  }
44
 
 
45
 
  public Observable asObservable() {
46
 
    return new Observable(QuantLibJNI.CapVolatilityStructure_asObservable(swigCPtr, this), true);
47
 
  }
48
 
 
49
 
  public CapVolatilityStructure() {
50
 
    this(QuantLibJNI.new_CapVolatilityStructure(), true);
51
 
  }
52
 
 
53
 
  public double volatility(Date end, double strike) {
54
 
    return QuantLibJNI.CapVolatilityStructure_volatility__SWIG_0(swigCPtr, this, Date.getCPtr(end), end, strike);
55
 
  }
56
 
 
57
 
  public double volatility(double end, double strike) {
58
 
    return QuantLibJNI.CapVolatilityStructure_volatility__SWIG_1(swigCPtr, this, end, strike);
59
 
  }
60
 
 
61
 
}