public CoordinateAxis findAxis ( AxisType type ) { CoordinateAxis result = null ; for ( CoordinateAxis axis : coordAxes ) { AxisType axisType = axis . getAxisType ( ) ; if ( ( axisType != null ) && ( axisType == type ) ) result = lesserRank ( result , axis ) ; } return result ; }
Find the CoordinateAxis that has the given AxisType . If more than one return the one with lesser rank .