The Octet Molecular Representation Framework v0.8.2

net.sf.octet.util
Class CollectionKit

java.lang.Object
  extended bynet.sf.octet.util.CollectionKit

public class CollectionKit
extends java.lang.Object

A group of static utility methods for working with the net.sf.octet.collection package.

Author:
Richard Apodaca

Method Summary
static AtomMap createAtomMap(AtomCollection keys, AtomCollection values)
          Returns an AtomMap that maps the nth Atom in keys with the nth Atom in values.
static AtomCollection getAtoms(AtomPairCollection pairs)
          Returns an AtomCollection containing the set of Atoms implicit in pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAtoms

public static AtomCollection getAtoms(AtomPairCollection pairs)
Returns an AtomCollection containing the set of Atoms implicit in pairs. Among other uses, this method can be used to generate edge-induced Subgraphs.

Parameters:
pairs - the collection to scan
Returns:
the set of Atoms implicit in pairs

createAtomMap

public static AtomMap createAtomMap(AtomCollection keys,
                                    AtomCollection values)
Returns an AtomMap that maps the nth Atom in keys with the nth Atom in values. If the number of Atoms in values exceeds that of keys, the resulting AtomMap will contain no key/value association for the unmappable Atoms in values. If the number of Atoms in keys exceeds that of values, the resulting AtomMap will contain no key/value associeation for the unmappable Atoms in keys.

Parameters:
keys - the key Atoms
values - the value Atoms
Returns:
the mapping of keys onto values
Throws:
java.lang.IllegalArgumentException - if keys contains duplicate Atoms

The Octet Molecular Representation Framework v0.8.2