@ SuppressWarnings ( { "checkstyle:magicnumber" , "checkstyle:cyclomaticcomplexity" } ) public boolean remove ( Point3D < ? , ? > point ) { if ( this . types != null && ! this . types . isEmpty ( ) && this . coords != null && ! this . coords . isEmpty ( ) ) { for ( int i = 0 , j = 0 ; i < this . coords . size ( ) && j < this . types . size ( ) ; j ++ ) { final Point3dfx currentPoint = this . coords . get ( i ) ; switch ( this . types . get ( j ) ) { case MOVE_TO : //$FALL-THROUGH$ case LINE_TO : if ( point . equals ( currentPoint ) ) { this . coords . remove ( i ) ; this . types . remove ( j ) ; return true ; } i ++ ; break ; case CURVE_TO : final Point3dfx p2 = this . coords . get ( i + 1 ) ; final Point3dfx p3 = this . coords . get ( i + 2 ) ; if ( ( point . equals ( currentPoint ) ) || ( point . equals ( p2 ) ) || ( point . equals ( p3 ) ) ) { this . coords . remove ( i , i + 3 ) ; this . types . remove ( j ) ; return true ; } i += 3 ; break ; case QUAD_TO : final Point3dfx pt = this . coords . get ( i + 1 ) ; if ( ( point . equals ( currentPoint ) ) || ( point . equals ( pt ) ) ) { this . coords . remove ( i , i + 2 ) ; this . types . remove ( j ) ; return true ; } i += 2 ; break ; case ARC_TO : throw new IllegalStateException ( ) ; //$CASES-OMITTED$ default : break ; } } } return false ; }
Remove the point from this path .