001//
002// This file is auto-generated. Please don't modify it!
003//
004package org.opencv.dnn;
005
006
007
008// C++: class DictValue
009/**
010 * This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64.
011 * TODO: Maybe int64 is useless because double type exactly stores at least 2^52 integers.
012 */
013public class DictValue {
014
015    protected final long nativeObj;
016    protected DictValue(long addr) { nativeObj = addr; }
017
018    public long getNativeObjAddr() { return nativeObj; }
019
020    // internal usage only
021    public static DictValue __fromPtr__(long addr) { return new DictValue(addr); }
022
023    //
024    // C++:   cv::dnn::DictValue::DictValue(int i)
025    //
026
027    public DictValue(int i) {
028        nativeObj = DictValue_0(i);
029    }
030
031
032    //
033    // C++:   cv::dnn::DictValue::DictValue(double p)
034    //
035
036    public DictValue(double p) {
037        nativeObj = DictValue_1(p);
038    }
039
040
041    //
042    // C++:   cv::dnn::DictValue::DictValue(String s)
043    //
044
045    public DictValue(String s) {
046        nativeObj = DictValue_2(s);
047    }
048
049
050    //
051    // C++:  bool cv::dnn::DictValue::isInt()
052    //
053
054    public boolean isInt() {
055        return isInt_0(nativeObj);
056    }
057
058
059    //
060    // C++:  bool cv::dnn::DictValue::isString()
061    //
062
063    public boolean isString() {
064        return isString_0(nativeObj);
065    }
066
067
068    //
069    // C++:  bool cv::dnn::DictValue::isReal()
070    //
071
072    public boolean isReal() {
073        return isReal_0(nativeObj);
074    }
075
076
077    //
078    // C++:  int cv::dnn::DictValue::getIntValue(int idx = -1)
079    //
080
081    public int getIntValue(int idx) {
082        return getIntValue_0(nativeObj, idx);
083    }
084
085    public int getIntValue() {
086        return getIntValue_1(nativeObj);
087    }
088
089
090    //
091    // C++:  double cv::dnn::DictValue::getRealValue(int idx = -1)
092    //
093
094    public double getRealValue(int idx) {
095        return getRealValue_0(nativeObj, idx);
096    }
097
098    public double getRealValue() {
099        return getRealValue_1(nativeObj);
100    }
101
102
103    //
104    // C++:  String cv::dnn::DictValue::getStringValue(int idx = -1)
105    //
106
107    public String getStringValue(int idx) {
108        return getStringValue_0(nativeObj, idx);
109    }
110
111    public String getStringValue() {
112        return getStringValue_1(nativeObj);
113    }
114
115
116    @Override
117    protected void finalize() throws Throwable {
118        delete(nativeObj);
119    }
120
121
122
123    // C++:   cv::dnn::DictValue::DictValue(int i)
124    private static native long DictValue_0(int i);
125
126    // C++:   cv::dnn::DictValue::DictValue(double p)
127    private static native long DictValue_1(double p);
128
129    // C++:   cv::dnn::DictValue::DictValue(String s)
130    private static native long DictValue_2(String s);
131
132    // C++:  bool cv::dnn::DictValue::isInt()
133    private static native boolean isInt_0(long nativeObj);
134
135    // C++:  bool cv::dnn::DictValue::isString()
136    private static native boolean isString_0(long nativeObj);
137
138    // C++:  bool cv::dnn::DictValue::isReal()
139    private static native boolean isReal_0(long nativeObj);
140
141    // C++:  int cv::dnn::DictValue::getIntValue(int idx = -1)
142    private static native int getIntValue_0(long nativeObj, int idx);
143    private static native int getIntValue_1(long nativeObj);
144
145    // C++:  double cv::dnn::DictValue::getRealValue(int idx = -1)
146    private static native double getRealValue_0(long nativeObj, int idx);
147    private static native double getRealValue_1(long nativeObj);
148
149    // C++:  String cv::dnn::DictValue::getStringValue(int idx = -1)
150    private static native String getStringValue_0(long nativeObj, int idx);
151    private static native String getStringValue_1(long nativeObj);
152
153    // native support for java finalize()
154    private static native void delete(long nativeObj);
155
156}