## com.bbn.openmap.geo
Class BoundaryCrossing.Collector

    java.lang.Object
      com.bbn.openmap.geo.MatchCollector.SetMatchCollector
          com.bbn.openmap.geo.BoundaryCrossing.Collector

All Implemented Interfaces:
  MatchCollector

Enclosing class:
  BoundaryCrossing

public static class BoundaryCrossing.Collector
extends MatchCollector.SetMatchCollector

A Collector is an object that organizes boundary crossings, as discovered by CrossingIntersection class.

Author:
  dietrick

Nested Class Summary

Nested classes inherited from class com.bbn.openmap.geo.MatchCollector
`MatchCollector.CollectionMatchCollector, MatchCollector.Pair, MatchCollector.PairArrayMatchCollector, MatchCollector.SetMatchCollector`

Field Summary

Fields inherited from class com.bbn.openmap.geo.MatchCollector.SetMatchCollector
`result`

Constructor Summary
`BoundaryCrossing.Collector()`

Method Summary
`protected void` `addCrossing(BoundaryCrossing bc)` Add a BoundaryCrossing to the collection of crossings.
`protected void` `addCrossing(java.util.Collection c, GeoSegment segment, GeoRegion region)` Add a BoundaryCrossing associated with a segment and region.
`protected void` `compact()` An important method that cleans up the segment/region BoundaryCrossing order, and also resolves the BoundaryCrossing.in/out settings for regions.
`java.util.Iterator` `getCrossings()`

Methods inherited from class com.bbn.openmap.geo.MatchCollector.SetMatchCollector
`collect, iterator`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BoundaryCrossing.Collector

    public BoundaryCrossing.Collector()

Method Detail

### addCrossing

    protected void addCrossing(BoundaryCrossing bc)

  Add a BoundaryCrossing to the collection of crossings.

  Parameters:
    `bc` -

### addCrossing

    protected void addCrossing(java.util.Collection c,
                               GeoSegment segment,
                               GeoRegion region)

  Add a BoundaryCrossing associated with a segment and region. This is the main thinkin' method, called by the CrossingInspector with lists of crossings. This method organizes and orders BorderCrossings according to the segment order of the path that caused the crossings.

  Parameters:
    `c` - A list of Geos that a segement intersects with a region.
    `segment` - GeoSegment
    `region` - GeoRegion

### compact

    protected void compact()

  An important method that cleans up the segment/region BoundaryCrossing order, and also resolves the BoundaryCrossing.in/out settings for regions. Must be called before the crossing iterator is retrieved, but the BoundaryCrossing method does that.

### getCrossings

    public java.util.Iterator getCrossings()

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details