@SuppressWarnings( "unchecked" ) @Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that )) { return false; } return ObjectUtils.nullSafeEquals( mLayout, ( (LayoutDecoratorConfig<W, C, M>) that ).mLayout ); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mPropertyStyle ); hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mNullPropertyStyle ); return hashCode; }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that ) ) { return false; } if ( mMaximumColumnsInDataTable != ( (HtmlWidgetBuilderConfig) that ).mMaximumColumnsInDataTable ) { return false; } return true; }
@Override public boolean equals( Object that ) { if ( !super.equals( that )) { return false; } if ( !ObjectUtils.nullSafeEquals( mErrorStyle, ( (SpringTableLayoutConfig) that ).mErrorStyle ) ) { return false; } if ( !ObjectUtils.nullSafeEquals( mErrorStyleClass, ( (SpringTableLayoutConfig) that ).mErrorStyleClass ) ) { return false; } return true; }
/** * @return 0 if toHash is null, otherwise returns toHash.hashCode() */ public static int nullSafeHashCode( Object toHash ) { if ( toHash == null ) { return 0; } // Array.hashCode is broken by default if ( toHash.getClass().isArray() ) { return deepHashCode( (Object[]) toHash ); } return toHash.hashCode(); }
eq = deepEquals( (Object[]) e1, (Object[]) e2 ); } else { eq = e1.equals( e2 );
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that ) ) { return false; } if ( mMaximumColumnsInDataTable != ( (JspWidgetBuilderConfig) that ).mMaximumColumnsInDataTable ) { return false; } return true; }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( that == null ) { return false; } if ( getClass() != that.getClass() ) { return false; } if ( !ObjectUtils.nullSafeEquals( mSource, ( (ConvertFromTo<?, ?>) that ).mSource ) ) { return false; } if ( !ObjectUtils.nullSafeEquals( mTarget, ( (ConvertFromTo<?, ?>) that ).mTarget ) ) { return false; } return true; }
/** * @return 0 if toHash is null, otherwise returns toHash.hashCode() */ public static int nullSafeHashCode( Object toHash ) { if ( toHash == null ) { return 0; } // Array.hashCode is broken by default if ( toHash.getClass().isArray() ) { return deepHashCode( (Object[]) toHash ); } return toHash.hashCode(); }
eq = deepEquals( (Object[]) e1, (Object[]) e2 ); } else { eq = e1.equals( e2 );
@SuppressWarnings( "unchecked" ) @Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that )) { return false; } return ObjectUtils.nullSafeEquals( mLayout, ( (LayoutDecoratorConfig<W, C, M>) that ).mLayout ); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mDataTableStyleClass ); hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mDataTableColumnClasses ); hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mDataTableRowClasses ); hashCode = 31 * hashCode + mMaximumColumnsInDataTable; return hashCode; }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that ) ) { return false; } if ( mMaximumColumnsInDataTable != ( (HtmlWidgetBuilderConfig) that ).mMaximumColumnsInDataTable ) { return false; } return true; }
/** * Copied from <code>Arrays.deepHashCode</code>. <code>Arrays.deepHashCode</code> not supported * by GWT 1.7. */ private static int deepHashCode( Object[] a ) { if ( a == null ) { return 0; } int result = 1; for ( Object element : a ) { int elementHash = 0; if ( element instanceof Object[] ) { elementHash = deepHashCode( (Object[]) element ); } else if ( element != null ) { elementHash = element.hashCode(); } result = 31 * result + elementHash; } return result; }
/** * Performs an equals() check on two Objects, either (or both) of which may be null. * <p> * This method returns <code>true</code> if both Objects are null. Whether, strictly speaking, * null == null is debatable, but this approach is useful for comparing two parent Objects who * have both left certain properties as null. Generally we want those two parent Objects to be * considered equal. * * @return true if both object1 and object2 are null, false if one is null and the other is not, * otherwise returns object1.equals( object2 ) */ public static boolean nullSafeEquals( Object object1, Object object2 ) { if ( object1 == null ) { return object2 == null; } // Array.equals is broken by default if ( object1.getClass().isArray() ) { if ( object2 == null || !object2.getClass().isArray() ) { return false; } return deepEquals( (Object[]) object1, (Object[]) object2 ); } return object1.equals( object2 ); }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that )) { return false; } if ( !ObjectUtils.nullSafeEquals( mWidgetBuilders, ( (CompositeWidgetBuilderConfig<?, ?>) that ).mWidgetBuilders ) ) { return false; } return true; }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mInjectThis ); hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mNullInjectThis ); hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode( mInject ); return hashCode; }
@Override public boolean equals( Object that ) { if ( this == that ) { return true; } if ( !ObjectUtils.nullSafeClassEquals( this, that )) { return false; } if ( mPartialSubmit != ( (IceFacesWidgetBuilderConfig) that ).mPartialSubmit ) { return false; } return true; }
/** * Copied from <code>Arrays.deepHashCode</code>. <code>Arrays.deepHashCode</code> not supported * by GWT 1.7. */ private static int deepHashCode( Object[] a ) { if ( a == null ) { return 0; } int result = 1; for ( Object element : a ) { int elementHash = 0; if ( element instanceof Object[] ) { elementHash = deepHashCode( (Object[]) element ); } else if ( element != null ) { elementHash = element.hashCode(); } result = 31 * result + elementHash; } return result; }
/** * Performs an equals() check on two Objects, either (or both) of which may be null. * <p> * This method returns <code>true</code> if both Objects are null. Whether, strictly speaking, * null == null is debatable, but this approach is useful for comparing two parent Objects who * have both left certain properties as null. Generally we want those two parent Objects to be * considered equal. * * @return true if both object1 and object2 are null, false if one is null and the other is not, * otherwise returns object1.equals( object2 ) */ public static boolean nullSafeEquals( Object object1, Object object2 ) { if ( object1 == null ) { return object2 == null; } // Array.equals is broken by default if ( object1.getClass().isArray() ) { if ( object2 == null || !object2.getClass().isArray() ) { return false; } return deepEquals( (Object[]) object1, (Object[]) object2 ); } return object1.equals( object2 ); }