public Version getVersion() { if ( version == null ) return new Version(); else return version; }
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof Version ) ) { return false; } Version that = (Version) other; boolean result = true; result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); return result; } //-- boolean equals( Object )
Version version = new Version(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) version.setPosition( getTrimmedValue( value ) );
copy.version = (Version) this.version.clone();
/** * Method hashCode. * * @return int */ public int hashCode() { int result = 17; result = 37 * result + ( name != null ? name.hashCode() : 0 ); result = 37 * result + ( bannerLeft != null ? bannerLeft.hashCode() : 0 ); result = 37 * result + ( bannerRight != null ? bannerRight.hashCode() : 0 ); result = 37 * result + ( googleAdSenseClient != null ? googleAdSenseClient.hashCode() : 0 ); result = 37 * result + ( googleAdSenseSlot != null ? googleAdSenseSlot.hashCode() : 0 ); result = 37 * result + ( googleAnalyticsAccountId != null ? googleAnalyticsAccountId.hashCode() : 0 ); result = 37 * result + ( publishDate != null ? publishDate.hashCode() : 0 ); result = 37 * result + ( version != null ? version.hashCode() : 0 ); result = 37 * result + ( edit != null ? edit.hashCode() : 0 ); result = 37 * result + ( poweredBy != null ? poweredBy.hashCode() : 0 ); result = 37 * result + ( skin != null ? skin.hashCode() : 0 ); result = 37 * result + ( body != null ? body.hashCode() : 0 ); result = 37 * result + ( custom != null ? custom.hashCode() : 0 ); return result; } //-- int hashCode()
result = result && ( getGoogleAnalyticsAccountId() == null ? that.getGoogleAnalyticsAccountId() == null : getGoogleAnalyticsAccountId().equals( that.getGoogleAnalyticsAccountId() ) ); result = result && ( getPublishDate() == null ? that.getPublishDate() == null : getPublishDate().equals( that.getPublishDate() ) ); result = result && ( getVersion() == null ? that.getVersion() == null : getVersion().equals( that.getVersion() ) ); result = result && ( getEdit() == null ? that.getEdit() == null : getEdit().equals( that.getEdit() ) ); result = result && ( getPoweredBy() == null ? that.getPoweredBy() == null : getPoweredBy().equals( that.getPoweredBy() ) );
child.setVersion( parent.getVersion().clone() );
/** * Method toString. * * @return String */ public java.lang.String toString() { StringBuilder buf = new StringBuilder( 128 ); buf.append( "position = '" ); buf.append( getPosition() ); buf.append( "'" ); return buf.toString(); } //-- java.lang.String toString()
/** * Method writeVersion. * * @param version * @param serializer * @param tagName * @throws java.io.IOException */ private void writeVersion( Version version, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( ( version.getPosition() != null ) && !version.getPosition().equals( "left" ) ) { serializer.attribute( NAMESPACE, "position", version.getPosition() ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writeVersion( Version, String, XmlSerializer )