code: public void prepareTriangulation( TriangulationContext<?> tcx )
      {
          int hint = _points.size();
          if(_steinerPoints != null) {
              hint += _steinerPoints.size();
          }
          if( _holes != null ) {
              for (Polygon p : _holes) {
                  hint += p.pointCount();
              }
          }
          HashMap<TriangulationPoint, TriangulationPoint> uniquePts = new HashMap<TriangulationPoint, TriangulationPoint>(hint);
          TriangulationPoint.mergeInstances(uniquePts, _points);
          if(_steinerPoints != null) {
              TriangulationPoint.mergeInstances(uniquePts, _steinerPoints);
          }
          if( _holes != null ) {
              for (Polygon p : _holes) {
                  TriangulationPoint.mergeInstances(uniquePts, p._points);
              }
          }
          if( m_triangles == null )
          {
              m_triangles = new ArrayList<DelaunayTriangle>( _points.size() );
          }
          else
          {
              m_triangles.clear();
          }
  
          // Outer constraints
          for( int i = 0; i < _points.size()-1 ; i++ )
          {
              tcx.newConstraint( _points.get( i ), _points.get( i+1 ) );
          }
          tcx.newConstraint( _points.get( 0 ), _points.get( _points.size()-1 ) );
  
          // Hole constraints
          if( _holes != null )
          {
              for( Polygon p : _holes )
              {
                  for( int i = 0; i < p._points.size()-1 ; i++ )
                  {
                      tcx.newConstraint( p._points.get( i ), p._points.get( i+1 ) );
                  }
                  tcx.newConstraint( p._points.get( 0 ), p._points.get( p._points.size()-1 ) );            
              }
          }
          tcx.addPoints(uniquePts.keySet());
      }
docs: Merge equals points.
  Creates constraints and populates the context with points.