Clazz.declarePackage ("net.sf.j2s.hello");
net.sf.j2s.hello.SimpleUser = function () {
this.FEMALE = net.sf.j2s.hello.SimpleUser.FEMALE;
this.MALE = net.sf.j2s.hello.SimpleUser.MALE;
this.name = null;
this.password = null;
this.email = null;
this.age = 0;
this.sex = 0;
Clazz.makeConstructor (net.sf.j2s.hello.SimpleUser, 
function () {
Clazz.superConstructor (this, net.sf.j2s.hello.SimpleUser);
});
Clazz.makeConstructor (net.sf.j2s.hello.SimpleUser, 
function (name, password) {
Clazz.superConstructor (this, net.sf.j2s.hello.SimpleUser);
this.name = name;
this.password = password;
}, "String, String");
Clazz.makeConstructor (net.sf.j2s.hello.SimpleUser, 
function (name, password, email, age, sex) {
Clazz.superConstructor (this, net.sf.j2s.hello.SimpleUser);
this.name = name;
this.password = password;
this.email = email;
this.age = age;
this.sex = sex;
}, "String, String, String, Number, Number");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "getAge", 
function () {
return this.age;
});
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "setAge", 
function (age) {
this.age = age;
}, "Number");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "getEmail", 
function () {
return this.email;
});
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "setEmail", 
function (email) {
this.email = email;
}, "String");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "getName", 
function () {
return this.name;
});
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "setName", 
function (name) {
this.name = name;
}, "String");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "getPassword", 
function () {
return this.password;
});
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "setPassword", 
function (password) {
this.password = password;
}, "String");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "getSex", 
function () {
return this.sex;
});
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "setSex", 
function (sex) {
this.sex = sex;
}, "Number");
Clazz.defineMethod (net.sf.j2s.hello.SimpleUser, "toString", 
function () {
var str = "This is user " + this.name + ", ";
if (this.age > 0) {
if (this.sex == net.sf.j2s.hello.SimpleUser.FEMALE) {
str += "she";
} else {
str += "he";
}str += " is " + this.age + " years old. ";
} else {
if (this.sex == net.sf.j2s.hello.SimpleUser.FEMALE) {
str += "her";
} else {
str += "his";
}str += " age is unkown. ";
}if (this.sex == net.sf.j2s.hello.SimpleUser.FEMALE) {
str += "She";
} else {
str += "He";
}if (this.email != null && this.email.length != 0) {
str += " has an email " + this.email + ".";
} else {
str += " has no email at this time.";
}return str;
});
Clazz.instantialize (this, arguments);
};
net.sf.j2s.hello.SimpleUser.__CLASS_NAME__ = net.sf.j2s.hello.SimpleUser.prototype.__CLASS_NAME__ = "net.sf.j2s.hello.SimpleUser";
net.sf.j2s.hello.SimpleUser.FEMALE = 2;
net.sf.j2s.hello.SimpleUser.MALE = 1;
