/** * Determines if this instance of the object is equals to another Object * * @return <code>true</code> if the supplied object is equivalent to this object, <code>false</code> otherwise */ public boolean equals( Object obj ) { if ( obj instanceof CSSValueList ) { CSSValueList that = (CSSValueList) obj; return ObjectUtilities.equalArray( this.values, that.values ); } else { return false; } }
private int findInserationPoint( final Object[] key, final int inserationPoint ) { for ( int i = inserationPoint; i < entries.size(); i++ ) { final Object[] existingKey = entries.get( i ); if ( ObjectUtilities.equalArray( existingKey, key ) ) { return i; } } return -1; }
public int indexOf( final int start, final Object[] key ) { if ( key == null ) { throw new NullPointerException(); } if ( start < 0 ) { throw new IndexOutOfBoundsException(); } final int size = entries.size(); for ( int i = start; i < size; i++ ) { final Object[] objects = entries.get( i ); if ( ObjectUtilities.equalArray( key, objects ) ) { return i; } } return -1; }
public int indexOf( final int start, final Object[] key ) { if ( key == null ) { throw new NullPointerException(); } if ( start < 0 ) { throw new IndexOutOfBoundsException(); } final int size = entries.size(); for ( int i = start; i < size; i++ ) { final Object[] objects = entries.get( i ); if ( ObjectUtilities.equalArray( key, objects ) ) { return i; } } return -1; }
public boolean equals( final Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } final FilesystemFilter that = (FilesystemFilter) o; if ( accDirs != that.accDirs ) { return false; } if ( descr != null ? !descr.equals( that.descr ) : that.descr != null ) { return false; } if ( !ObjectUtilities.equalArray( fileext, that.fileext ) ) { return false; } return true; }
/** * Determines if this instance of the object is equals to another Object * * @return <code>true</code> if the supplied object is equivalent to this object, <code>false</code> otherwise */ public boolean equals( Object obj ) { if ( obj instanceof CSSFunctionValue ) { CSSFunctionValue that = (CSSFunctionValue) obj; return ( ObjectUtilities.equal( this.functionName, that.functionName ) && ObjectUtilities.equalArray( this.parameters, that.parameters ) ); } else { return false; } }
public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final FilesystemFilter that = (FilesystemFilter) o; if (accDirs != that.accDirs) { return false; } if (descr != null ? !descr.equals(that.descr) : that.descr != null) { return false; } if (!ObjectUtilities.equalArray(fileext, that.fileext)) { return false; } return true; }
private boolean equalsMap( final Map<String, Object> values, final Map<String, Object> otherValues ) { if ( otherValues.size() != values.size() ) { return false; } for ( final String key : values.keySet() ) { final Object value = values.get( key ); final Object otherValue = otherValues.get( key ); if ( value == null && otherValue == null ) { continue; } if ( value instanceof Object[] && otherValue instanceof Object[] ) { if ( ObjectUtilities.equalArray( (Object[]) value, (Object[]) otherValue ) == false ) { return false; } } else if ( ObjectUtilities.equal( value, otherValue ) == false ) { return false; } } return true; }
private boolean equalsMap( final Map otherValues ) { if ( otherValues.size() != values.size() ) { return false; } for ( int i = 0; i < names.length; i++ ) { final String key = names[i]; final Object value = values.get( key ); final Object otherValue = otherValues.get( key ); if ( value == null && otherValue == null ) { continue; } if ( value instanceof Object[] && otherValue instanceof Object[] ) { if ( ObjectUtilities.equalArray( (Object[]) value, (Object[]) otherValue ) == false ) { return false; } } else if ( ObjectUtilities.equal( value, otherValue ) == false ) { return false; } } return true; }
/** * Checks whether the group is equal. A group is considered equal to another group, if it defines the same fields as * the other group. * * @param obj * the object to be checked * @return true, if the object is a group instance with the same fields, false otherwise. */ public boolean equals( final Object obj ) { if ( this == obj ) { return true; } if ( !( obj instanceof RelationalGroup ) ) { return false; } final RelationalGroup group = (RelationalGroup) obj; final String[] otherFields = group.getFieldsArray(); final String[] myFields = getFieldsArray(); if ( ObjectUtilities.equalArray( otherFields, myFields ) == false ) { return false; } return true; }
public void add( final DataRow dataRow ) { final Object[] newKey = new Object[columnSet.length]; for ( int i = 0; i < columnSet.length; i++ ) { final String columnName = columnSet[i]; newKey[i] = dataRow.get( columnName ); } final int insertPosition = findInserationPoint( newKey, 0 ); if ( insertPosition != -1 ) { if ( insertPosition < insertationCursor ) { throw new InvalidReportStateException( "Conflicting data in crosstab. " + "Cannot use insertion-order as base for normalization. Use a SortedMerge-Specification instead." ); } final Object[] existingKey = entries.get( insertPosition ); if ( ObjectUtilities.equalArray( existingKey, newKey ) ) { // key already exists, so we skip forward to that position. logger.debug( "Known Key: " + insertPosition + " " + insertationCursor + " -> " + printKey( newKey ) ); insertationCursor = insertPosition; return; } } insertationCursor = entries.size(); logger.debug( "Added Key: " + insertationCursor + " -> " + printKey( newKey ) ); entries.add( newKey ); }
final Object[] oldRowKey = paddingDataRow.createRowKey( globalView ); if ( ObjectUtilities.equalArray( tempRowKey, oldRowKey ) == false ) { if ( logger.isDebugEnabled() ) { logger.debug( "TempRowKey=" + Arrays.asList( tempRowKey ) + "; RowKey=" + Arrays.asList( oldRowKey ) final Object[] tempColKey = dataRow.paddingDataRow.createColumnKey( tempGlobalView ); final Object[] oldColKey = dataRow.paddingDataRow.createColumnKey( globalView ); if ( ObjectUtilities.equalArray( tempColKey, oldColKey ) ) { if ( logger.isDebugEnabled() ) { logger.debug( "Row- and Column-Key still the same, staying in current crosstab-position = "