From bc5db25592238aff6f864547e98fceeb496d15d4 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Fri, 27 Apr 2018 17:00:17 +0200 Subject: [PATCH] JSdoc added --- frontend-js/src/main/js/map/data/Alias.js | 143 +++++++++++++++++++++- 1 file changed, 141 insertions(+), 2 deletions(-) diff --git a/frontend-js/src/main/js/map/data/Alias.js b/frontend-js/src/main/js/map/data/Alias.js index 77fbeabf0c..c1207a7045 100644 --- a/frontend-js/src/main/js/map/data/Alias.js +++ b/frontend-js/src/main/js/map/data/Alias.js @@ -9,7 +9,7 @@ var logger = require('../../logger'); /** * Class representing alias data. * - * @param javaObject + * @param {Alias|Object} javaObject * object de-serialized ajax query to the server side */ function Alias(javaObject) { @@ -45,7 +45,7 @@ Alias.prototype.constructor = Alias; * Updates alias with full data information. This function should be called when * full information about alias is retrieved from server. * - * @param javaObject + * @param {Alias|Object} javaObject * object representing data from server side */ Alias.prototype.update = function (javaObject) { @@ -123,139 +123,278 @@ Alias.prototype.update = function (javaObject) { } }; +/** + * + * @returns {number} + */ Alias.prototype.getCharge = function () { return this.charge; }; + +/** + * + * @param {number} charge + */ Alias.prototype.setCharge = function (charge) { this.charge = charge; }; +/** + * + * @returns {boolean} + */ Alias.prototype.getConstant = function () { return this._constant; }; + +/** + * + * @param {boolean} constant + */ Alias.prototype.setConstant = function (constant) { this._constant = constant; }; +/** + * + * @returns {boolean} + */ Alias.prototype.getBoundaryCondition = function () { return this._boundaryCondition; }; + +/** + * + * @param {boolean} boundaryCondition + */ Alias.prototype.setBoundaryCondition = function (boundaryCondition) { this._boundaryCondition = boundaryCondition; }; +/** + * + * @returns {number} + */ Alias.prototype.getInitialAmount = function () { return this._initialAmount; }; + +/** + * + * @param {number} initialAmount + */ Alias.prototype.setInitialAmount = function (initialAmount) { this._initialAmount = initialAmount; }; +/** + * + * @returns {number} + */ Alias.prototype.getInitialConcentration = function () { return this._initialConcentration; }; + +/** + * + * @param {number} initialConcentration + */ Alias.prototype.setInitialConcentration = function (initialConcentration) { this._initialConcentration = initialConcentration; }; +/** + * + * @returns {string[]} + */ Alias.prototype.getFormerSymbols = function () { return this.formerSymbols; }; +/** + * + * @param {string[]} formerSymbols + */ Alias.prototype.setFormerSymbols = function (formerSymbols) { this.formerSymbols = formerSymbols; }; +/** + * + * @returns {number} + */ Alias.prototype.getX = function () { return this.x; }; +/** + * + * @param {number} x + */ Alias.prototype.setX = function (x) { if (x !== undefined) { this.x = x; } }; +/** + * + * @param {number} y + */ Alias.prototype.setY = function (y) { if (y !== undefined) { this.y = y; } }; +/** + * + * @returns {number} + */ Alias.prototype.getY = function () { return this.y; }; +/** + * + * @param {number} elementId + */ Alias.prototype.setElementId = function (elementId) { this._elementId = elementId; }; +/** + * + * @returns {number} + */ Alias.prototype.getElementId = function () { return this._elementId; }; +/** + * + * @param {number} width + */ Alias.prototype.setWidth = function (width) { if (width !== undefined) { this.width = width; } }; +/** + * + * @param {number} height + */ Alias.prototype.setHeight = function (height) { if (height !== undefined) { this.height = height; } }; + +/** + * + * @returns {number} + */ Alias.prototype.getWidth = function () { return this.width; }; +/** + * + * @returns {number} + */ Alias.prototype.getHeight = function () { return this.height; }; +/** + * + * @returns {string} + */ Alias.prototype.getName = function () { return this.name; }; +/** + * + * @param {string} name + */ Alias.prototype.setName = function (name) { this.name = name; }; +/** + * + * @returns {string} + */ Alias.prototype.getFullName = function () { return this.fullName; }; +/** + * + * @param {string} fullName + */ Alias.prototype.setFullName = function (fullName) { this.fullName = fullName; }; +/** + * + * @returns {number} + */ Alias.prototype.getCompartmentId = function () { return this._compartmentId; }; +/** + * + * @param {number} compartmentId + */ Alias.prototype.setCompartmentId = function (compartmentId) { if (compartmentId !== null) { this._compartmentId = compartmentId; } }; + +/** + * + * @returns {number} + */ Alias.prototype.getComplexId = function () { return this._complexId; }; +/** + * + * @param {number} complexId + */ Alias.prototype.setComplexId = function (complexId) { if (complexId !== null) { this._complexId = complexId; } }; +/** + * + * @returns {number} + */ Alias.prototype.getTransparencyLevel = function () { return this._transparencyLevel; }; +/** + * + * @param {number} transparencyLevel + */ Alias.prototype.setTransparencyLevel = function (transparencyLevel) { this._transparencyLevel = transparencyLevel; }; +/** + * + * @returns {Point} + */ Alias.prototype.getCenter = function () { return new Point(this.getX() + this.getWidth() / 2, this.getY() + this.getHeight() / 2); }; -- GitLab