public boolean equals( Object o ) { if ( this == o ) { return true; } if ( !( o instanceof FeatureTag ) ) { return false; } final FeatureTag featureTag = (FeatureTag) o; if ( xrefs != null ? !xrefs.equals( featureTag.xrefs ) : featureTag.xrefs != null ) { return false; } if ( featureDetection != null ? !featureDetection.equals( featureTag.featureDetection ) : featureTag.featureDetection != null ) { return false; } if ( !featureType.equals( featureTag.featureType ) ) { return false; } if ( fullname != null ? !fullname.equals( featureTag.fullname ) : featureTag.fullname != null ) { return false; } if ( !location.equals( featureTag.location ) ) { return false; } if ( shortlabel != null ? !shortlabel.equals( featureTag.shortlabel ) : featureTag.shortlabel != null ) { return false; } return true; }
/** * compare two ranges. * * @param range * @param location * * @return */ public static boolean areRangeEquals( Range range, LocationTag location ) { boolean equals = ( range.getFromIntervalStart() == location.getFromIntervalStart() && range.getFromIntervalEnd() == location.getFromIntervalEnd() && range.getToIntervalStart() == location.getToIntervalStart() && range.getToIntervalEnd() == location.getToIntervalEnd() ); if ( DEBUG ) { System.out.print( "RANGE from " + range.getFromIntervalStart() + ".." + range.getFromIntervalEnd() ); System.out.println( " to " + range.getToIntervalStart() + ".." + range.getToIntervalEnd() ); System.out.print( "LOCATION from " + location.getFromIntervalStart() + ".." + location.getFromIntervalEnd() ); System.out.println( " to " + location.getToIntervalStart() + ".." + location.getToIntervalEnd() ); if ( equals ) { System.out.println( "EQUALS" ); } else { System.out.println( "DIFFERENT" ); } } return equals; }
public int hashCode() { int result = 29 + ( shortlabel != null ? shortlabel.hashCode() : 0 ); result = 29 * result + ( fullname != null ? fullname.hashCode() : 0 ); result = 29 * result + ( xrefs != null ? xrefs.hashCode() : 0 ); result = 29 * result + featureType.hashCode(); result = 29 + ( featureDetection != null ? featureDetection.hashCode() : 0 ); result = 29 * result + location.hashCode(); return result; }
try { location = new LocationTag( from, to );
try { location = new LocationTag( from, to );
/** * compare two ranges. * * @param range * @param location * * @return */ public static boolean areRangeEquals( Range range, LocationTag location ) { boolean equals = ( range.getFromIntervalStart() == location.getFromIntervalStart() && range.getFromIntervalEnd() == location.getFromIntervalEnd() && range.getToIntervalStart() == location.getToIntervalStart() && range.getToIntervalEnd() == location.getToIntervalEnd() ); if ( DEBUG ) { System.out.print( "RANGE from " + range.getFromIntervalStart() + ".." + range.getFromIntervalEnd() ); System.out.println( " to " + range.getToIntervalStart() + ".." + range.getToIntervalEnd() ); System.out.print( "LOCATION from " + location.getFromIntervalStart() + ".." + location.getFromIntervalEnd() ); System.out.println( " to " + location.getToIntervalStart() + ".." + location.getToIntervalEnd() ); if ( equals ) { System.out.println( "EQUALS" ); } else { System.out.println( "DIFFERENT" ); } } return equals; }
public int hashCode() { int result = 29 + ( shortlabel != null ? shortlabel.hashCode() : 0 ); result = 29 * result + ( fullname != null ? fullname.hashCode() : 0 ); result = 29 * result + ( xrefs != null ? xrefs.hashCode() : 0 ); result = 29 * result + featureType.hashCode(); result = 29 + ( featureDetection != null ? featureDetection.hashCode() : 0 ); result = 29 * result + location.hashCode(); return result; }
public boolean equals( Object o ) { if ( this == o ) { return true; } if ( !( o instanceof FeatureTag ) ) { return false; } final FeatureTag featureTag = (FeatureTag) o; if ( xrefs != null ? !xrefs.equals( featureTag.xrefs ) : featureTag.xrefs != null ) { return false; } if ( featureDetection != null ? !featureDetection.equals( featureTag.featureDetection ) : featureTag.featureDetection != null ) { return false; } if ( !featureType.equals( featureTag.featureType ) ) { return false; } if ( fullname != null ? !fullname.equals( featureTag.fullname ) : featureTag.fullname != null ) { return false; } if ( !location.equals( featureTag.location ) ) { return false; } if ( shortlabel != null ? !shortlabel.equals( featureTag.shortlabel ) : featureTag.shortlabel != null ) { return false; } return true; }
try { location = new LocationTag( from, to );
/** * compare two ranges. * * @param range * @param location * * @return */ public static boolean areRangeEquals( Range range, LocationTag location ) { boolean equals = ( range.getFromIntervalStart() == location.getFromIntervalStart() && range.getFromIntervalEnd() == location.getFromIntervalEnd() && range.getToIntervalStart() == location.getToIntervalStart() && range.getToIntervalEnd() == location.getToIntervalEnd() ); if ( DEBUG ) { System.out.print( "RANGE from " + range.getFromIntervalStart() + ".." + range.getFromIntervalEnd() ); System.out.println( " to " + range.getToIntervalStart() + ".." + range.getToIntervalEnd() ); System.out.print( "LOCATION from " + location.getFromIntervalStart() + ".." + location.getFromIntervalEnd() ); System.out.println( " to " + location.getToIntervalStart() + ".." + location.getToIntervalEnd() ); if ( equals ) { System.out.println( "EQUALS" ); } else { System.out.println( "DIFFERENT" ); } } return equals; }
public int hashCode() { int result = 29 + ( shortlabel != null ? shortlabel.hashCode() : 0 ); result = 29 * result + ( fullname != null ? fullname.hashCode() : 0 ); result = 29 * result + ( xrefs != null ? xrefs.hashCode() : 0 ); result = 29 * result + featureType.hashCode(); result = 29 + ( featureDetection != null ? featureDetection.hashCode() : 0 ); result = 29 * result + location.hashCode(); return result; }
public boolean equals( Object o ) { if ( this == o ) { return true; } if ( !( o instanceof FeatureTag ) ) { return false; } final FeatureTag featureTag = (FeatureTag) o; if ( xrefs != null ? !xrefs.equals( featureTag.xrefs ) : featureTag.xrefs != null ) { return false; } if ( featureDetection != null ? !featureDetection.equals( featureTag.featureDetection ) : featureTag.featureDetection != null ) { return false; } if ( !featureType.equals( featureTag.featureType ) ) { return false; } if ( fullname != null ? !fullname.equals( featureTag.fullname ) : featureTag.fullname != null ) { return false; } if ( !location.equals( featureTag.location ) ) { return false; } if ( shortlabel != null ? !shortlabel.equals( featureTag.shortlabel ) : featureTag.shortlabel != null ) { return false; } return true; }
sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." ); sb.append( location.getFromIntervalStart() ); sb.append( ".." ); sb.append( "range to=" ).append( location.getToIntervalStart() ); sb.append( ".." ); sb.append( location.getToIntervalEnd() );
sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." ); sb.append( location.getFromIntervalStart() ); sb.append( ".." ); sb.append( "range to=" ).append( location.getToIntervalStart() ); sb.append( ".." ); sb.append( location.getToIntervalEnd() );
sb.append( " range from=" ).append( location.getFromIntervalEnd() ); sb.append( ".." ); sb.append( location.getFromIntervalStart() ); sb.append( ".." ); sb.append( "range to=" ).append( location.getToIntervalStart() ); sb.append( ".." ); sb.append( location.getToIntervalEnd() );
(int) location.getFromIntervalStart(), (int) location.getFromIntervalEnd(), (int) location.getToIntervalStart(), (int) location.getToIntervalEnd(), sequence );
(int) location.getFromIntervalStart(), (int) location.getFromIntervalEnd(), (int) location.getToIntervalStart(), (int) location.getToIntervalEnd(), sequence );
(int) location.getFromIntervalStart(), (int) location.getFromIntervalEnd(), (int) location.getToIntervalStart(), (int) location.getToIntervalEnd(), sequence );