private static String getValue ( File file ) throws NullPointerException { if ( file == null ) { return null ; } return file . getName ( ) . toLowerCase ( ) . replaceAll ( EXTENSION_REX , "" ) . replaceAll ( NOT_LETTERS_REX , " " ) ; }
Challenge value associated with image file . File name is converted to lower case extension removed and non letter characters replaces with space that is non letters are considered words separators .