List axisList = getAxes(); if (axisList.size() == 0 || !this.hasFieldAxis() ){ return null; }  Object axisObj = axisList.get(0);  if (axisObj instanceof FieldAxis) return (FieldAxis) axisObj; else return null;
FieldAxis fieldAxis = null;  if (hasFieldAxis) { List axisList = getAxes(); Iterator iter = axisList.iterator(); while (iter.hasNext()) { Object axis = (Object) iter.next(); if (axis instanceof FieldAxis) { return (FieldAxis) axis; } } }  return fieldAxis;
   public FieldAxis getFieldAxis() {       List axisList = getAxes();       if (axisList.size() == 0 || !this.hasFieldAxis() ){  //empty axisList or lacks field Axis          return null;       }          Object axisObj = axisList.get(0);          if (axisObj instanceof FieldAxis)         return (FieldAxis) axisObj;       else         return null;   }