Java Code Examples for org.apache.commons.collections.CollectionUtils.isEqualCollection()

The following are Jave code examples for showing how to use isEqualCollection() of the org.apache.commons.collections.CollectionUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: wmboost-data   File: DocumentTest.java   View Source Code Vote up 7 votes
@Test
public void testGetTopLevelKeys() {
	List<String> expected = Lists.newArrayList("value1", "value2");

	IData idata = IDataFactory.create();
	IDataCursor cursor = idata.getCursor();
	IDataUtil.put(cursor, "value1", "something");
	IDataUtil.put(cursor, "value2", "another one");
	cursor.destroy();

	Document document = docFactory.wrap(idata);
	CollectionUtils.isEqualCollection(expected, document.getKeys());
}
 
Example 2
Project: verify-service-provider   File: Attributes.java   View Source Code Vote up 6 votes
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Attributes that = (Attributes) o;
    if (firstName != null ? !firstName.equals(that.firstName) : that.firstName != null) return false;
    if (middleName != null ? !middleName.equals(that.middleName) : that.middleName != null) return false;
    if (surname != null ? !surname.equals(that.surname) : that.surname != null) return false;
    if (dateOfBirth != null ? !dateOfBirth.equals(that.dateOfBirth) : that.dateOfBirth != null) return false;
    if (address != null ? !address.equals(that.address) : that.address != null) return false;
    if (addressHistory != null ? !(that.addressHistory != null && CollectionUtils.isEqualCollection(addressHistory, that.addressHistory)) : that.addressHistory != null) return false;
    return cycle3 != null ? cycle3.equals(that.cycle3) : that.cycle3 == null;
}