X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Fprotein%2FDomainId.java;h=8802283400a6479a24ddbe304247d044c492ff8c;hb=87d34f343d0262cd0c009c6f1da058a5a217bc64;hp=89a23cf4c5503759a9c1296e4ad818f9fa3c044d;hpb=656be28debec520e0e35a8b311114398a40ea366;p=jalview.git diff --git a/forester/java/src/org/forester/protein/DomainId.java b/forester/java/src/org/forester/protein/DomainId.java index 89a23cf..8802283 100644 --- a/forester/java/src/org/forester/protein/DomainId.java +++ b/forester/java/src/org/forester/protein/DomainId.java @@ -26,18 +26,14 @@ package org.forester.protein; -import java.util.ArrayList; -import java.util.List; - -import org.forester.go.GoId; import org.forester.util.ForesterUtil; public class DomainId implements Comparable { final private String _id; - private List _go_ids; - public DomainId( final String id ) { + // private List _go_ids; + private DomainId( final String id ) { if ( ForesterUtil.isEmpty( id ) ) { throw new IllegalArgumentException( "attempt to create domain id from empty or null string" ); } @@ -50,16 +46,15 @@ public class DomainId implements Comparable { throw new IllegalArgumentException( "attempt to create domain id from string containing the separator character [" + BinaryDomainCombination.SEPARATOR + "] for domain combinations [" + _id + "]" ); } - setGoIds( null ); - } - - public void addGoId( final GoId go_id ) { - if ( getGoIds() == null ) { - setGoIds( new ArrayList() ); - } - getGoIds().add( go_id ); + ///////////////////////////// // setGoIds( null ); } + // public void addGoId( final GoId go_id ) { + // if ( getGoIds() == null ) { + // setGoIds( new ArrayList() ); + // } + // getGoIds().add( go_id ); + // } @Override public int compareTo( final DomainId domain_id ) { if ( this == domain_id ) { @@ -85,10 +80,9 @@ public class DomainId implements Comparable { } } - public GoId getGoId( final int i ) { - return getGoIds().get( i ); - } - + // public GoId getGoId( final int i ) { + // return getGoIds().get( i ); + //} // Note. // The fact that equals and compareTo do not behave the same in cases where ids only differ by their case // is not ideal. From Sun regarding Interface SortedSet: @@ -100,30 +94,27 @@ public class DomainId implements Comparable { // so two elements that are deemed equal by this method are, from the standpoint of the sorted set, // equal. The behavior of a sorted set is well-defined even if its ordering is inconsistent with equals; // it just fails to obey the general contract of the Set interface." - public List getGoIds() { - return _go_ids; - } - - public String getId() { + // public List getGoIds() { + // return _go_ids; + // } + private String getId() { return _id; } - public int getNumberOfGoIds() { - if ( getGoIds() == null ) { - return 0; - } - return getGoIds().size(); - } - + // public int getNumberOfGoIds() { + // if ( getGoIds() == null ) { + // return 0; + // } + // return getGoIds().size(); + // } @Override public int hashCode() { return getId().hashCode(); } - private void setGoIds( final List go_ids ) { - _go_ids = go_ids; - } - + // private void setGoIds( final List go_ids ) { + // _go_ids = go_ids; + // } @Override public String toString() { return getId();