SEBoolean.java
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
00003  * All rights reserved. This program is made available under the terms of the
00004  * Eclipse Public License v1.0 which accompanies this distribution, and is
00005  * available at http://www.eclipse.org/legal/epl-v10.html
00006  * Contributors:
00007  * General Robotix Inc.
00008  * National Institute of Advanced Industrial Science and Technology (AIST) 
00009  */
00017 package com.generalrobotix.ui.view.graph;
00018 
00019 public class SEBoolean extends SEEnumeration {
00020     Boolean value_;
00021     static String[] __s = {"false", "true"};
00022     
00023     
00024     public SEBoolean(String s) {
00025         super(__s, 0);
00026         fromString(s);
00027     };
00028 
00029     public SEBoolean() {
00030         super(__s, 0);
00031         value_ = new Boolean(false);
00032     };
00033 
00039     public SEBoolean(boolean value) {
00040         super(__s, _getSelect(value));
00041         value_ = new Boolean(value);
00042     };
00043 
00044 
00045     private static int _getSelect(boolean b) {
00046         return b ? 1 : 0;
00047     }
00048 
00054     public String toString() {
00055         return value_.toString();
00056     }
00057 
00064     public Object fromString(String str) {
00065         value_ = Boolean.valueOf(str);
00066         selection_ = _getSelect(value_.booleanValue());
00067         return (Object)value_;
00068     }
00069 
00075     public void setValue(Object value) {
00076         value_ = (Boolean)value;
00077         selection_ = _getSelect(value_.booleanValue());
00078     }
00079 
00085     public void setValue(String str) {
00086         value_ = Boolean.valueOf(str);
00087         selection_ = _getSelect(value_.booleanValue());
00088     }
00089 
00095     public Object getValue() {
00096         return (Object)value_;
00097     }
00098 
00104     public boolean booleanValue() {
00105         return value_.booleanValue();
00106     }
00107 };


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:43:57