RE regex = null;  try { regex = new RE( "\\." ); } catch ( REException e ) { e.printStackTrace(); }  Long int1 = new Long( regex.substituteAll( this.address.getHostAddress(), "" ) ); Long int2 = new Long( regex.substituteAll( anAddress.address.getHostAddress(), "" ) ); return int1.compareTo( int2 );
return this.compareTo( this.address.getAddress(), anAddress.address.getAddress(), 0 );
	public int compareTo( Addr anAddress ) {		/* compare between hasHostName() */		if ( this.hasHostName() && !anAddress.hasHostName() )			return 1;		if ( !this.hasHostName() && anAddress.hasHostName() )			return -1;		if ( this.hasHostName() && anAddress.hasHostName() )			return this.getHostName().compareToIgnoreCase( anAddress.getHostName() );			RE regex = null;		/* compare by ipaddress */		try {			 regex = new RE( "\\." );		}		catch ( REException e ) {						e.printStackTrace();		}				Long int1 = new Long( regex.substituteAll( this.address.getHostAddress(), "" ) );		Long int2 = new Long( regex.substituteAll( anAddress.address.getHostAddress(), "" ) );		return int1.compareTo( int2 );	}