Skip to content

Instantly share code, notes, and snippets.

@bdb1234
Created June 25, 2015 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdb1234/e12732ec62ad574f7ced to your computer and use it in GitHub Desktop.
Save bdb1234/e12732ec62ad574f7ced to your computer and use it in GitHub Desktop.
/**
* @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