~ubuntu-branches/ubuntu/trusty/scilab/trusty

« back to all changes in this revision

Viewing changes to modules/javasci/src/java/javasci/SciBoolean.java

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-02 11:02:49 UTC
  • mfrom: (1.4.6)
  • Revision ID: package-import@ubuntu.com-20120802110249-0v5953emkp25geuz
Tags: 5.4.0-beta-2-1~exp1
* New upstream release
* Remove libscilab-java (remove upstream). Use libscilab2-java instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3
 
 * Copyright (C) 2007 - INRIA - Allan CORNET
4
 
 * Copyright (C) 2007 - INRIA - Sylvestre LEDRU
5
 
 * 
6
 
 * This file must be used under the terms of the CeCILL.
7
 
 * This source file is licensed as described in the file COPYING, which
8
 
 * you should have received as part of this distribution.  The terms
9
 
 * are also available at    
10
 
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11
 
 *
12
 
 */
13
 
 
14
 
package javasci;
15
 
 
16
 
/**
17
 
 * Scilab Boolean object
18
 
 * See SCI/modules/javasci/examples/others for some simple examples 
19
 
 * @author Allan CORNET - INRIA 2007
20
 
 * @author Sylvestre LEDRU - INRIA 2007
21
 
 */
22
 
public class SciBoolean extends SciAbstractDataType implements java.io.Serializable  
23
 
{
24
 
        private String typeDescription = "boolean";
25
 
        
26
 
        /**
27
 
         * Constructs a Scilab Boolean from a other SciBoolean
28
 
     * @deprecated
29
 
         * @param name the name of the Scilab variable
30
 
         * @param booleanObj the Sciboolean you want to copy
31
 
         */
32
 
        public SciBoolean(String name, SciBoolean booleanObj) {
33
 
                boolean[] pTmpBooleanArray = new boolean[1];
34
 
                pTmpBooleanArray[0] = booleanObj.getData();
35
 
                sciArray = new SciBooleanArray(name, 1, 1, pTmpBooleanArray);
36
 
        }
37
 
 
38
 
        /**
39
 
         * Constructs a Scilab Boolean
40
 
     * @deprecated
41
 
         * @param name the name of the Scilab variable
42
 
         */
43
 
        public SciBoolean(String name) {
44
 
                sciArray = new SciBooleanArray(name, 1, 1);
45
 
 
46
 
        }
47
 
 
48
 
        /**
49
 
         * Constructs a Scilab Boolean from a java boolean
50
 
     * @deprecated
51
 
         * @param name the name of the Scilab variable
52
 
         * @param value the boolean value
53
 
         */
54
 
        public SciBoolean(String name, boolean value) {
55
 
                boolean[] pTmpBooleanArray = new boolean[1];
56
 
                pTmpBooleanArray[0] = value;
57
 
                sciArray = new SciBooleanArray(name, 1, 1, pTmpBooleanArray);
58
 
        }
59
 
 
60
 
        /**
61
 
         * Returns the boolean value
62
 
     * @deprecated
63
 
         * @return the value
64
 
         */
65
 
        public boolean getData() {
66
 
                Get();
67
 
                boolean[] pTmpBooleanArray = ((SciBooleanArray) sciArray).getData();
68
 
                return pTmpBooleanArray[0];
69
 
        }
70
 
 
71
 
        /**
72
 
         * Return the description of the DataType
73
 
         * Description must set in any class which extends SciAbstractDataType
74
 
     * @deprecated
75
 
         * @return the Description
76
 
         *
77
 
         */
78
 
        public String getTypeDescription() {
79
 
                return this.typeDescription;
80
 
        }
81
 
 
82
 
}
83
 
/********************************************************************************************************/