Created
June 25, 2015 01:21
-
-
Save bdb1234/4751dc6d6cee9eecc5fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @constructor | |
* @param {trove.data.TestObjectBuilder} builder | |
*/ | |
trove.data.TestObject = function(builder) { | |
this.alphanumericList_ = builder.alphanumericList; | |
this.primitiveAlphanumeric_ = builder.primitiveAlphanumeric; | |
this.primitiveString_ = builder.primitiveString; | |
this.stringSet_ = builder.stringSet; | |
}; | |
/** | |
* @type {!Array.<string>} | |
*/ | |
trove.data.TestObject.prototype.alphanumericList_; | |
/** | |
* @type {!string} | |
*/ | |
trove.data.TestObject.prototype.primitiveAlphanumeric_; | |
/** | |
* @type {!string} | |
*/ | |
trove.data.TestObject.prototype.primitiveString_; | |
/** | |
* @type {!Array.<string>} | |
*/ | |
trove.data.TestObject.prototype.stringSet_; | |
/** | |
* @param {trove.data.TestObject} otherTestObject | |
* @return {boolean} | |
*/ | |
trove.data.TestObject.prototype.equals = function(otherTestObject) { | |
return !!otherTestObject && | |
goog.array.equals(this.getAlphanumericList(), otherTestObject.getAlphanumericList()) && | |
goog.array.equals(this.getStringSet(), otherTestObject.getStringSet()) && | |
this.getPrimitiveAlphanumeric() == otherTestObject.getPrimitiveAlphanumeric() && | |
this.getPrimitiveString() == otherTestObject.getPrimitiveString(); | |
}; | |
/** | |
* @return {!Array.<string>} | |
*/ | |
trove.data.TestObject.prototype.getAlphanumericList = function() { | |
return this.alphanumericList_; | |
}; | |
/** | |
* @return {!string} | |
*/ | |
trove.data.TestObject.prototype.getPrimitiveAlphanumeric = function() { | |
return this.primitiveAlphanumeric_; | |
}; | |
/** | |
* @return {!string} | |
*/ | |
trove.data.TestObject.prototype.getPrimitiveString = function() { | |
return this.primitiveString_; | |
}; | |
/** | |
* @return {!Array.<string>} | |
*/ | |
trove.data.TestObject.prototype.getStringSet = function() { | |
return this.stringSet_; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment