etomica.atom.iterator
Class ApiBuilder

java.lang.Object
  extended by etomica.atom.iterator.ApiBuilder

public final class ApiBuilder
extends Object

Provides static methods for construction of some useful pair iterators.


Method Summary
static ApiIntragroup makeAdjacentPairIterator()
          Pair iterator that constructs pairs from the childlist atoms of a basis, each with the atom adjacent to it in the list.
static ApiIntergroup makeIntergroupTypeIterator(IAtomType[] types)
          Returns an intergroup iterator that filters the iterates so that only those having the given type instances are returned.
static ApiIntragroup makeNonAdjacentPairIterator()
          Pair iterator that constructs pairs from the childlist atoms of a basis, each with all atoms that are not adjacent to it in the list.
static ApiIntragroup makeNonAdjacentPairIterator(int numToSkip)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeAdjacentPairIterator

public static ApiIntragroup makeAdjacentPairIterator()
Pair iterator that constructs pairs from the childlist atoms of a basis, each with the atom adjacent to it in the list. If no target is set, returns each such pair once. If a target is set, returns the target atom with the atom uplist from it (if direction is not set, or is set to UP) or down from it (if direction is set to DOWN), or both (if direction is set to null).


makeNonAdjacentPairIterator

public static ApiIntragroup makeNonAdjacentPairIterator()
Pair iterator that constructs pairs from the childlist atoms of a basis, each with all atoms that are not adjacent to it in the list. If no target is set, returns each such pair once. If a target is set, returns the target atom with the non-adjacent atoms uplist from it (if direction is not set, or is set to UP) or down from it (if direction is set to DOWN), or both (if direction is set to null).


makeNonAdjacentPairIterator

public static ApiIntragroup makeNonAdjacentPairIterator(int numToSkip)

makeIntergroupTypeIterator

public static ApiIntergroup makeIntergroupTypeIterator(IAtomType[] types)
Returns an intergroup iterator that filters the iterates so that only those having the given type instances are returned. The given types are applied corresponding to the pair of basis atoms identified when the iterator's setBasis method is invoked. Child atoms of the first basis atom only having type = types[0] are given, in pairs with child atoms of the second basis atom only having type = types[1].

Throws:
IllegalArgumentException - if the types array is not of length 2