ern-api-gen
Version:
Electrode Native API generator
68 lines • 1.88 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const javaUtil_1 = require("../../java/javaUtil");
class Parameter {
constructor() {
this.required = false;
this.vendorExtensions = javaUtil_1.newHashMap();
}
isUniqueItems() {
return this.uniqueItems;
}
isExclusiveMinimum() {
return this.exclusiveMinimum != null;
}
isExclusiveMaximum() {
return this.exclusiveMaximum != null;
}
setFormat(format) {
this.format = format;
}
getFormat() {
return this.format;
}
getIn() {
return this.in;
}
isReadOnly() {
return this.readOnly;
}
setVendorExtension(name, value) {
if (name.startsWith('-x')) {
this.vendorExtensions.put(name, value);
}
}
getVendorExtensions() {
return this.vendorExtensions;
}
getDefaultValue() {
return this.defaultValue;
}
setDefaultValue(defaultValue) {
this.defaultValue = defaultValue;
}
getDefault() {
if (this.defaultValue == null || this.defaultValue.length === 0) {
return null;
}
return this.defaultValue;
}
setDefault(defaultValue) {
this.defaultValue = defaultValue == null ? null : defaultValue.toString();
}
copy() {
const res = new Parameter();
res.required = this.required;
res.vendorExtensions = this.vendorExtensions;
res.uniqueItems = this.uniqueItems;
res.exclusiveMinimum = this.exclusiveMinimum;
res.exclusiveMaximum = this.exclusiveMaximum;
res.format = this.format;
res.in = this.in;
res.readOnly = this.readOnly;
res.defaultValue = this.defaultValue;
return res;
}
}
exports.Parameter = Parameter;
//# sourceMappingURL=Parameter.js.map