You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
545 B
24 lines
545 B
'use strict';
|
|
|
|
require('classtool');
|
|
|
|
function ClassSpec(b) {
|
|
var superclass = b.superclass || require('./util/VersionedData').class();
|
|
|
|
function Address() {
|
|
Address.super(this, arguments);
|
|
}
|
|
|
|
Address.superclass = superclass;
|
|
superclass.applyEncodingsTo(Address);
|
|
|
|
Address.prototype.validate = function() {
|
|
this.doAsBinary(function() {
|
|
Address.super(this, 'validate', arguments);
|
|
if(this.data.length !== 21) throw new Error('invalid data length');
|
|
});
|
|
};
|
|
|
|
return Address;
|
|
}
|
|
module.defineClass(ClassSpec);
|
|
|