define('jls/lang/Bean', ['jls/lang/Class'], function(Class) {

    var Bean = Class.create({
        clone : function() {
            var clazz = this.constructor;
            var instance = new clazz();
            for (var key in this) {
                if (typeof this[key] != 'function') {
                    instance[key] = this[key];
                }
            }
            return instance;
        },
        equals : function(b) {
            if (b === this) {
                return true;
            }
            for (var key in this) {
                if ((typeof this[key] != 'function') && (b[key] != this[key])) {
                    return false;
                }
            }
            return true;
        }
    });

    return Bean;
});
