List of usage examples for org.apache.commons.lang3.builder EqualsBuilder reflectionEquals
public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients)
This method uses reflection to determine if the two Object
s are equal.
It uses AccessibleObject.setAccessible
to gain access to private fields.
From source file:com.kuzumeji.uuo.framework.standard.shared.AbstractValueObject.java
/** {@inheritDoc} */ @Override/*w w w . j a va 2 s. co m*/ public boolean sameValueAs(final V other) { return EqualsBuilder.reflectionEquals(this, other, false); }
From source file:com.meltmedia.jackson.crypto.beans.Nested.java
public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o, true); }
From source file:kamuy.AbstractDataObject.java
/** * See {@link EqualsBuilder#reflectionEquals(Object, Object, boolean)}. * {@inheritDoc}/* w w w .j a v a 2s . co m*/ */ @Override public boolean equals(final Object aThat) { return EqualsBuilder.reflectionEquals(this, aThat, false); }
From source file:io.github.theangrydev.coffee.domain.base.ValueType.java
@SuppressWarnings("EqualsWhichDoesntCheckParameterClass") @Override// w ww . j a v a2 s . com public boolean equals(Object object) { return EqualsBuilder.reflectionEquals(this, object, emptySet()); }
From source file:blue.soundObject.PianoRollTest.java
@Test public void testSerialization() { PianoRoll instance = new PianoRoll(); PianoRoll p2 = (PianoRoll) instance.clone(); assertTrue(EqualsBuilder.reflectionEquals(instance, p2, (String[]) null)); }
From source file:com.github.aynu.mosir.core.standard.lang.AbstractValueObject.java
/** * {@inheritDoc}//w w w . j a v a2 s . c o m * <dl> * <dt>? * <dd>(transient)???????????? * </dl> */ @Override public boolean sameValueAs(final T object) { return EqualsBuilder.reflectionEquals(this, object, TEST_TRANSIENTS); }
From source file:com.greendot.entity.product.Product.java
@Override public boolean equals(final Object o) { if (o == null) return false; if (this == o) return true; if (!(Hibernate.getClass(o).equals(Product.class))) return false; final Product product = (Product) o; if ((getProductId() != null) && (product.getProductId() == getProductId())) return true; if (getProductId() == null) return EqualsBuilder.reflectionEquals(this, product, "productId"); return false; }
From source file:com.kuzumeji.uuo.framework.standard.shared.AbstractDataObject.java
/** * {@inheritDoc}/*from w w w.jav a 2 s. c o m*/ * <dl> * <dt>? * <dd>??????????((transient)?) * </dl> */ @Override public boolean equals(final Object other) { return EqualsBuilder.reflectionEquals(this, other, true); }
From source file:com.github.aynu.mosir.core.standard.lang.AbstractDataObject.java
/** * {@inheritDoc}//from w w w .j a v a2s . c o m * <dl> * <dt>? * <dd>(transient)????????????? * </dl> */ @Override public boolean equals(final Object obj) { return EqualsBuilder.reflectionEquals(this, obj, TEST_TRANSIENTS); }
From source file:blue.clojure.soundObject.ClojureSoundObjectTest.java
/** * Test of saveAsXML method, of class ClojureObject. */// w ww .j a v a 2 s . c o m @Test public void testSaveAsXML() throws Exception { System.out.println("saveAsXML"); Map<Object, String> objRefMap = null; ClojureObject instance = new ClojureObject(); instance.setClojureCode("(def score \"i1 0 2 3 5\")"); Element result = instance.saveAsXML(objRefMap); ClojureObject instance2 = (ClojureObject) ClojureObject.loadFromXML(result, null); assertTrue(EqualsBuilder.reflectionEquals(instance, instance2, null)); }