1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.29
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.quantlib;
public class Calendar {
private long swigCPtr;
protected boolean swigCMemOwn;
protected Calendar(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Calendar obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
QuantLibJNI.delete_Calendar(swigCPtr);
}
swigCPtr = 0;
}
public boolean isBusinessDay(Date arg0) {
return QuantLibJNI.Calendar_isBusinessDay(swigCPtr, Date.getCPtr(arg0));
}
public boolean isHoliday(Date arg0) {
return QuantLibJNI.Calendar_isHoliday(swigCPtr, Date.getCPtr(arg0));
}
public boolean isEndOfMonth(Date arg0) {
return QuantLibJNI.Calendar_isEndOfMonth(swigCPtr, Date.getCPtr(arg0));
}
public void addHoliday(Date arg0) {
QuantLibJNI.Calendar_addHoliday(swigCPtr, Date.getCPtr(arg0));
}
public void removeHoliday(Date arg0) {
QuantLibJNI.Calendar_removeHoliday(swigCPtr, Date.getCPtr(arg0));
}
public Date adjust(Date d, BusinessDayConvention convention, Date origin) {
return new Date(QuantLibJNI.Calendar_adjust__SWIG_0(swigCPtr, Date.getCPtr(d), convention.swigValue(), Date.getCPtr(origin)), true);
}
public Date adjust(Date d, BusinessDayConvention convention) {
return new Date(QuantLibJNI.Calendar_adjust__SWIG_1(swigCPtr, Date.getCPtr(d), convention.swigValue()), true);
}
public Date adjust(Date d) {
return new Date(QuantLibJNI.Calendar_adjust__SWIG_2(swigCPtr, Date.getCPtr(d)), true);
}
public Date advance(Date d, int n, TimeUnit unit, BusinessDayConvention convention) {
return new Date(QuantLibJNI.Calendar_advance__SWIG_0(swigCPtr, Date.getCPtr(d), n, unit.swigValue(), convention.swigValue()), true);
}
public Date advance(Date d, int n, TimeUnit unit) {
return new Date(QuantLibJNI.Calendar_advance__SWIG_1(swigCPtr, Date.getCPtr(d), n, unit.swigValue()), true);
}
public Date advance(Date d, Period period, BusinessDayConvention convention) {
return new Date(QuantLibJNI.Calendar_advance__SWIG_2(swigCPtr, Date.getCPtr(d), Period.getCPtr(period), convention.swigValue()), true);
}
public Date advance(Date d, Period period) {
return new Date(QuantLibJNI.Calendar_advance__SWIG_3(swigCPtr, Date.getCPtr(d), Period.getCPtr(period)), true);
}
public String toString() {
return QuantLibJNI.Calendar_toString(swigCPtr);
}
public boolean equals(Calendar other) {
return QuantLibJNI.Calendar_equals(swigCPtr, Calendar.getCPtr(other));
}
public boolean unEquals(Calendar other) {
return QuantLibJNI.Calendar_unEquals(swigCPtr, Calendar.getCPtr(other));
}
}
|