org.proteinshader.structure
Interface IDTest

All Known Implementing Classes:
AminoAcid, Atom, BetaStrand, Chain, Helix, Heterogen, Loop, Model, Region, Residue, Structure, Water

public interface IDTest

This interface declares a processID() method that is intended to be used as a helper method for constructors that need to perform tests and/or any modifications on an ID.

As examples, processID() can be used to verify that an ID is not null or an empty String, it can be used to remove leading or trailing whitespace, or to add a prefix (such as "HET_" for the residueID of a Heterogen).


Method Summary
 String processID(String id, String typeOfID)
          Returns the ID after trimming any leading or trailing whitespace.
 

Method Detail

processID

String processID(String id,
                 String typeOfID)
                 throws InvalidIDException
Returns the ID after trimming any leading or trailing whitespace. An ID must have at least one non-whitespace character, and additional tests may be performed depending on the class.

Parameters:
id - ID to process.
typeOfID - type of ID (for possible use in error message).
Returns:
The trimmed ID.
Throws:
InvalidIDException - if the ID is null or does not have at least one non-whitespace character.


Copyright © 2007-2008