что происходит в данной конструкции?
fileLine = fileLine.replaceAll("\\b" + entry.getKey() + "\\b", entry.getValue());
package com.javarush.task.task19.task1924;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
/*
Замена чисел
*/
public class Solution {
public static Map<Integer, String> map = new HashMap<Integer, String>();
static {
map.put(0,"ноль");
map.put(1,"один");
map.put(2,"два");
map.put(3,"три");
map.put(4,"четыре");
map.put(5,"пять");
map.put(6,"шесть");
map.put(7,"семь");
map.put(8,"восемь");
map.put(9,"девять");
map.put(10,"десять");
map.put(11,"одиннадцать");
map.put(12,"двенадцать");
}
public static void main(String[] args) throws IOException{
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
String filename=reader.readLine();
reader.close();
BufferedReader fileReader=new BufferedReader(new FileReader(filename));
while (fileReader.ready())
{
String line= fileReader.readLine();
line=line.substring(0,line.length()-1);
String[] arrLine=line.split(" ");
String temp="";
for(String s:arrLine)
{
if(isDigit(s))
{
int x=Integer.parseInt(s);
if(map.containsKey(x))
temp+=map.get(x)+" ";
else temp+=s+" ";
}
else temp+=s+" ";
}
temp=temp.trim();
temp+=".";
System.out.print(temp);
System.out.println();
/*for(String s:arsLine)
{
char[] chars=s.toCharArray();
if(Character.isDigit(chars[0]))
{
String number="";
for(int i=0;i<chars.length;i++) {
if(Character.isDigit(chars[i])) {
number += chars[i];
}
else
{
}
}
int x=Integer.parseInt(number);
if (map.containsKey(x))
temp+=map.get(x)+" ";
else temp+=number;
}
else
temp+=s+" ";
}
*/
/*String[] arrLine=line.split(" ");
for(String s:arrLine)
{
if(isDigit(s))
{
int x=Integer.parseInt(s);
if(map.containsKey(x))
System.out.print(map.get(x)+" ");
else System.out.print(s+" ");
}
else System.out.print(s+" ");
}
System.out.println();
*
*/
}
fileReader.close();
}
public static boolean isDigit(String line)
{
try
{
int x =Integer.parseInt(line);
return true;
}
catch (NumberFormatException nfe)
{
return false;
}
}
}