public void parseName ( ) { if ( getName ( ) != null ) { String name = getName ( ) . trim ( ) ; int firstSp = name . indexOf ( ' ' ) ; if ( firstSp > 0 ) { setFirst ( name . substring ( 0 , firstSp ) ) ; int lastSp = name . lastIndexOf ( ' ' ) ; setLast ( name . substring ( lastSp + 1 ) ) ; } else { setFirst ( name ) ; } } }
Set first and last name based on full name .