code: public static Component of(final Set<String> pdbccIds,
  			final boolean isNTerminal, final boolean isCTerminal) {
  		if (isNTerminal && isCTerminal) {
  			throw new IllegalArgumentException("An amino acid can be at" +
  			"N-terminal or C-terminal but not both."); //TODO: is this true?
  		}
  
  		lazyInit();
  
  		Component comp;
  		if (isNTerminal) {
  			comp = nTerminalAminoAcids.get(pdbccIds);
  			if (comp == null) {
  				comp = new Component(pdbccIds, isNTerminal, isCTerminal);
  				nTerminalAminoAcids.put(pdbccIds, comp);
  			}
  		} else if (isCTerminal) {
  			comp = cTerminalAminoAcids.get(pdbccIds);
  			if (comp == null) {
  				comp = new Component(pdbccIds, isNTerminal, isCTerminal);
  				cTerminalAminoAcids.put(pdbccIds, comp);
  			}
  		} else {
  			comp = nonTerminalComps.get(pdbccIds);
  			if (comp == null) {
  				comp = new Component(pdbccIds, isNTerminal, isCTerminal);
  				nonTerminalComps.put(pdbccIds, comp);
  			}
  		}
  
  		components.add(comp);
  		return comp;
  	}
docs: Get or create a Component.
  @param pdbccIds a set of possible Protein Data Bank ID.
  @param isNTerminal true if occurring at N-terminal. false, otherwise.
  @param isCTerminal true if occurring at C-terminal. false, otherwise.
  @return a component.
  @throws IllegalArgumentException if pdbccId or type is null,
  or the pdbccId has been registered as a different type,
  or terminal condition is indicated for non-amino-acid component,
  or both N-terminal and C-terminal are true.