Last active
August 29, 2015 14:23
-
-
Save bdb1234/3be17623f4bf170521bc 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
goog.provide('trove.data.TestObject'); | |
goog.provide('trove.data.TestObjectBuilder'); | |
/** | |
* @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