User: kz Date: 2008-05-05 15:29:22+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/styles/StyleMapperKey.java
Log: INTEGRATION: CWS dba30beta (1.3.6); FILE MERGED 2008/04/22 10:30:34 oj 1.3.6.1: #i88503# merge changes from rptchart02 File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/styles/ ===================================================================== File [changed]: StyleMapperKey.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/styles/StyleMapperKey.java?r1=1.3&r2=1.4 Delta lines: +64 -79 --------------------- --- StyleMapperKey.java 2008-04-10 18:01:46+0000 1.3 +++ StyleMapperKey.java 2008-05-05 15:29:18+0000 1.4 @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - - package com.sun.star.report.pentaho.styles; /** @@ -39,11 +37,12 @@ */ public final class StyleMapperKey { - private String elementNamespace; - private String elementName; - private String attributeNamespace; - private String attributeName; - private int hashCode; + + private final String elementNamespace; + private final String elementName; + private final String attributeNamespace; + private final String attributeName; + private final int hashCode; public StyleMapperKey(final String elementNamespace, final String elementName, @@ -88,10 +87,8 @@ public boolean equals(final Object o) { - if (this == o) + if (this != o) { - return true; - } if (o == null || getClass() != o.getClass()) { return false; @@ -99,23 +96,12 @@ final StyleMapperKey that = (StyleMapperKey) o; - if (attributeName != null ? !attributeName.equals( - that.attributeName) : that.attributeName != null) + if ((attributeName != null ? !attributeName.equals(that.attributeName) : that.attributeName != null) || + (attributeNamespace != null ? !attributeNamespace.equals(that.attributeNamespace) : that.attributeNamespace != null) || + !elementName.equals(that.elementName) || !elementNamespace.equals(that.elementNamespace)) { return false; } - if (attributeNamespace != null ? !attributeNamespace.equals( - that.attributeNamespace) : that.attributeNamespace != null) - { - return false; - } - if (!elementName.equals(that.elementName)) - { - return false; - } - if (!elementNamespace.equals(that.elementNamespace)) - { - return false; } return true; @@ -123,8 +109,7 @@ private int computeHashCode() { - int result; - result = elementNamespace.hashCode(); + int result = elementNamespace.hashCode(); result = 31 * result + elementName.hashCode(); result = 31 * result + (attributeNamespace != null ? attributeNamespace.hashCode() : 0); result = 31 * result + (attributeName != null ? attributeName.hashCode() : 0); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
