// Copyright (C) 2008-2009 Christian M. Zmasek
// Copyright (C) 2008-2009 Burnham Institute for Medical Research
// All rights reserved
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
-//
+//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import java.util.SortedSet;
import java.util.TreeSet;
+// Note: when implementing any "equals" method need to keep in mind that
+// proteins could have the same name and/or id!
public class BasicProtein implements Protein {
private final ProteinId _id;
init();
}
+ @Override
public void addProteinDomain( final Domain protein_domain ) {
getProteinDomains().add( protein_domain );
}
return _name;
}
+ @Override
public int getNumberOfProteinDomains() {
return getProteinDomains().size();
}
+ @Override
public Domain getProteinDomain( final int index ) {
return _protein_domains.get( index );
}
+ @Override
public int getProteinDomainCount( final DomainId domain_id ) {
return getProteinDomains( domain_id ).size();
}
return ids;
}
+ @Override
public List<Domain> getProteinDomains() {
return _protein_domains;
}
+ @Override
public List<Domain> getProteinDomains( final DomainId domain_id ) {
final List<Domain> domains = new ArrayList<Domain>();
for( final Domain domain : getProteinDomains() ) {
return domains;
}
+ @Override
public ProteinId getProteinId() {
return _id;
}
+ @Override
public Species getSpecies() {
return _species;
}