Subtracting values of two maps whenever there is a key match? - java

I'll explain the logic: I am reading a XML file which contain many request and responses in soap format then I'm storing the request and response in two Hash map. In first Hash map I'm storing transaction Id(unique) as key and values as request time,til-name. In second hash map I'm storing transaction Id(unique) as key and values as response time. In both hash map the keys are same but values are different, by using for loop iterating two loops and I need to get the time difference between response time and request time
eg:request time:2020-01-30T11:07:08.351Z and response time:2020-01-30T11:07:10.152Z
public class MapTimeDiff {
public static void main(String[] args) throws ParseException {
File file =new File("C:\\Users\\gsanaulla\\Documents\\My Received Files\\ecarewsframework.xml");
Scanner in = null;
String tilname = null;
String transactionId = null;
String requesttime = null;
String responsetime = null;
Date dateOne = null;
Date dateTwo = null;
double timeDiff;
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
Map<String,ArrayList<String>> request=new HashMap<String,ArrayList<String>>();
ArrayList<String> req=new ArrayList<String>();
Map<String,ArrayList<String>> response=new HashMap<String,ArrayList<String>>();
ArrayList<String> res=new ArrayList<String>();
try {
in = new Scanner(file);
while(in.hasNext())
{
String line=in.nextLine();
if(line.contains("</S:Envelope>")) {
System.out.println(line);
tilname=line.split("StartRecord><")[1].split("><")[0].split(":")[1];
System.out.println("tilname :: "+tilname);
transactionId = line.split("transactionId>")[1].split("<")[0];
System.out.println("transactio id :: "+transactionId);
requesttime=line.split("sourceTimestamp>")[1].split("<")[0];
System.out.println("request time is :: "+requesttime);
dateOne = df.parse(requesttime);
}
req.add(tilname);
req.add(dateOne.toString());
System.out.println("req is==== " +req);
request.put(transactionId,req);
System.out.println("request is==== " +request.get(transactionId));
if(line.contains("</SOAP-ENV:Envelope>")) {
//System.out.println(line);
if(line.contains("transactionId"))
{
responsetime=line.split("sourceTimestamp>")[1].split("<")[0];
transactionId = line.split("transactionId>")[1].split("<")[0];
System.out.println("responsetime :: "+responsetime);
System.out.println("transaction id "+transactionId);
dateTwo = df.parse(responsetime);
}
res.add(dateTwo.toString());
System.out.println("res is===== "+res);
response.put(transactionId,res);
System.out.println("response is===== "+response.get(transactionId));
for (Entry<String, ArrayList<String>> entry : request.entrySet()) {
for (Entry<String, ArrayList<String>> entry1 : response.entrySet()) {
System.out.println("Key = " + entry.getKey() +
", Value = " + entry.getValue());
System.out.println("Key = " + entry1.getKey() +
", Value = " + entry1.getValue());
if(request.keySet().equals(response.keySet())) {
timeDiff = (dateTwo.getTime() - dateOne.getTime());
}
}
}
}
}
}
catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

I'm not sure if I understood your question correctly but maybe you can do something similiar like the following:
Map<String, List<String>> requests = Map.of("1", List.of("10,13,12"), "2", List.of("8,7,9"), "3", List.of("11"));
Map<String, List<String>> responses = Map.of("1", List.of("9,10,14"), "2", List.of("8,9,6,12"));
for(Map.Entry<String, List<String>> requestEntry : requests.entrySet()) {
String transactionId = requestEntry.getKey();
if(responses.containsKey(transactionId)) {
System.out.println("Transaction Id: " + transactionId);
for(int i = 0; i < min(requestEntry.getValue().size(), responses.get(transactionId).size()); i++) {
List<String> requestTimes = asList(requestEntry.getValue().get(i).split(","));
List<String> responseTimes = asList(responses.get(transactionId).get(i).split(","));
for(int j = 0; j < min(requestTimes.size(), responseTimes.size()); j++) {
int requestTime = parseInt(requestTimes.get(j));
int responseTime = parseInt(responseTimes.get(j));
System.out.println("Difference: " + abs(requestTime - responseTime));
}
}
}
}
As you can see there are no responses for transactionId 3 so this will be ignored.
If elements in the list for a key differ in size (transactionId 2) the surplus elements will also be ignored.
Transaction Id: 1
Difference: 1
Difference: 3
Difference: 2
Transaction Id: 2
Difference: 0
Difference: 2
Difference: 3

Related

How can I get values from a hashMap dynamically - Java

I am working with HashMap and don't have much experience yet.
I am trying to write a csvFile for proof of a comparison between two lists.
If the compared value is the same ok otherwise not ok.
Simple, but the values "ok" or "not ok" need to be changed automatically, so it was suggested to me to use HashMap where I put the name of the compared field which is the key and the value will be its state (ok or not ok).
So far the values are returned and the file is written, but the status does not fill in automatically.
This is my code so far, if anyone knows how I can do it or has other suggestions please let me know.
HashMap
public static Map<String, String> initMap(String status) {
Map<String, String> mapFields = new HashMap<String, String>();
mapFields.put("Book Ref", status);
mapFields.put("Trade Date", status);
mapFields.put("Start Date", status);
mapFields.put("End Date", status);
mapFields.put("Period Multiplier", status);
mapFields.put("Notional", status);
mapFields.put("Currency", status);
mapFields.put("Rate", status);
mapFields.put("Frequency Multiplier", status);
mapFields.put("Day count", status);
return mapFields;
}
Here in the same class, I created this method to compare two lists and define if it is ok or not.
public static void compareValues(List<String> inputs, List<String> outputs, XrayFields fields, TradeData data, MKTWireIRS mkt) throws ParseException, InterruptedException {
int y = 0;
int x = 0;
Map<String, String> map = new HashMap<String, String>();
// List<WriterCSV> writeCSV = new ArrayList<>();
WriterCSV cv = new WriterCSV();
try {
for (String input : inputs) {
for (String out : outputs) {
cv = new WriterCSV();
map = new HashMap<String, String>();
if (y == x) {
if (input.equals(out)) {
System.out.println("ok: " + input + " = " + out);
String comment = "All fields checked are ok";
fields.setComment(comment);
fields.setStatus("PASS");
cv.setOk("Ok");
map = initMap(cv.getOk());
} else {
System.out.println("not ok: " + input + " = " + out);
fields.setStatus("FAIL");
String comment = "The value " + input + " is not the same as " + out;
fields.setComment(comment);
cv.setOk("not Ok");
map = initMap(cv.getOk());
}
}
x = x + 1; // count of the list of output
}
y = y + 1; // count of the list of inputs
x = 0; // reset to 0 the count of outputs
}
//create evidence of comparison
cv.reportMKTWireToOutputIRS(data, mkt, map);
} catch (Error e) {
System.out.println(e);
}
}
This is the method for writing the csv.
public void reportMKTWireToOutputIRS(TradeData data2, MKTWireIRS mkt, Map<String, String> map ) throws ParseException, InterruptedException {
try {
FileWriter fw = new FileWriter(new File(CSV_MKTWire + Setup.IRScsv));
CSVWriter cw = new CSVWriter(fw);
//format values
String month = PropertyNames.deCapitalize(data2.getPeriod());
String monthReset = PropertyNames.deCapitalize(data2.getResetFrequencyPeriod());
String formatTradeDateMKT = Utils.formatDateToCompareMKTWire(data2.getTradeDateIRS());
String formatStartDateMKT = Utils.formatDateToCompareMKTWire(data2.getStart_Date());
String formatMAturityDateMKT = Utils.formatDateToCompareMKTWire(data2.getMaturity_Date());
String rateActual = Utils.roundDecimal(data2.getRateIRS());
String rateFormat = Utils.roundRateMKTwire(mkt.getRateIRS());
String notionalFormat = data2.getNotional().charAt(0) + "M";
String[] headers = { "Output Field", "Output Value", " MKTWire Field", " MKTWire Value", "Status" };
List<String[]> data = new ArrayList<String[]>();
String[] book = { "Book Ref", data2.getBookRef() + data2.getBookType(),"Book MKTWire",mkt.getBookIRS(), map.get("Book Ref")};
String[] tradeDate = { "Trade Date", formatTradeDateMKT,"Trade Date MKTWire",mkt.getTradeDateIRS(), map.get("Trade Date")};
String[] startDate = { "Start Date", formatStartDateMKT, "Start Date MKTWire",mkt.getStartDate(), map.get("Start Date") };
String[] maturity = { "End Date", formatMAturityDateMKT, "End Date MKTWire",mkt.getEndDate(), map.get("End Date") };
String[] tenor = { "Period Multiplier", data2.getPeriodMultiplier() + month, "Tenor MKTWire",mkt.getTenorIRS(), map.get("Period Multiplier") };
String[] notional = { "Notional", notionalFormat, "Notional MKTWire", mkt.getNotionalValueIRS(), map.get("Notional") };
String[] currency = { "Currency", data2.getCurrencyIRS(), "Currency MKTWire", mkt.getCurrencyIRS(), map.get("Currency") };
String[] rate = { "Rate", rateActual, "Rate MKTWire", rateFormat, map.get("Rate") };
String[] resetFrequency = { "Frequency Multiplier", data2.getResetFrequencyMultiplier() + monthReset, "Frequency Multiplier MKTWire", mkt.getResetFrequencyIRS(),map.get("Frequency Multiplier") };
String[] dayCount = { "Day Count", data2.getDayCount(), "Day Count MKTWire", mkt.getDayCountIRS(), map.get("Day count") };
data.add(headers);
data.add(book);
data.add(tradeDate);
data.add(startDate);
data.add(maturity);
data.add(tenor);
data.add(notional);
data.add(currency);
data.add(rate);
data.add(resetFrequency);
data.add(dayCount);
cw.writeAll(data);
cw.flush();
fw.flush();
cw.close();
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
}
You are having one map and you are calling the initMap method which sets the value for all keys in the map within a loop, in the end it will have either "ok" or "not ok" based on your final loop validation.

Consolidate result of different dates by scanning the data from file and output data of particular date

I have recently given interview with major MNC and faced a coding question. It was an inventory based question. Got a file which has inputs as:
Date, name of fruit, no of fruits sold, total fruits.
**2018-06-01,apple,15,25 ;
2018-06-02,apple,13,25 ;
2018-06-03,apple,20,25 ;
2018-06-01,mango,12,25 ;
2018-06-02,mango,19,25 ;
2018-06-03,mango,20,25 ;
2018-06-01,orange,15,25 ;
2018-06-02,mango,16,25 ;
2018-06-02,orange,14,25 ;
2018-06-03,orange,24,25 ;
2018-06-02,apple,18,25**
I have to iterate file and in the end print out the results how many fruits sold on 2018-06-02. Below is the code which i have writen
enter code here
public class Inventory {
public static void main(String[] args) throws IOException {
FileInputStream geek = new FileInputStream("/Users/preet/Desktop/test2.txt");
InputStreamReader reader = new InputStreamReader(geek, StandardCharsets.UTF_8);
BufferedReader in = new BufferedReader(reader);
List<String> lines = new ArrayList<String>();
Map<String, Map<String, List<Integer>>> map = new HashMap<String, Map<String, List<Integer>>>();
Map<String, List<Integer>> map2 = new HashMap<String, List<Integer>>();
List<Integer> apple = new ArrayList<Integer>();
List<Integer> mango = new ArrayList<Integer>();
List<Integer> orange = new ArrayList<Integer>();
String result = "";
String line = null;
String[] input = new String[10];
int i = 0;
while ((line = in.readLine()) != null) {
input[i] = line;
System.out.println("value at " + i + ":" + input[i]);
i++;
}
for (String a : input) {
String b[] = a.split(",");
if (b[1].equalsIgnoreCase("apple")) {
apple.add(Integer.parseInt(b[2]));
map2.put(b[1], apple);
map.put(b[0], map2);
} else if (b[1].equalsIgnoreCase("orange")) {
orange.add(Integer.parseInt(b[2]));
map2.put(b[1], orange);
map.put(b[0], map2);
} else if (b[1].equalsIgnoreCase("mango")) {
mango.add(Integer.parseInt(b[2]));
map2.put(b[1], mango);
map.put(b[0], map2);
}
if (map.containsKey(b[0])) {
Object value1 = map.get(b[0]);
map.put(b[0], map2);
} else
map.put(b[0], map2);
}
System.out.println("Fetching Keys and corresponding [Multiple] Values n");
List<String> results = new ArrayList<String>();
for (Map.Entry<String, Map<String, List<Integer>>> entry : map.entrySet()) {
String orange1 = null;
String apple1 = null;
String mango1 = null;
int a1 = 0;
int a2 = 0;
int a3 = 0;
Map<String, List<Integer>> values = entry.getValue();
for (Map.Entry<String, List<Integer>> entry1 : map2.entrySet()) {
String key = entry1.getKey();
if (key.equalsIgnoreCase("apple")) {
List l1 = entry1.getValue();
for (int j = 0; j < l1.size(); j++) {
a1 = (int) l1.get(j);
}
apple1 = entry.getKey() + " " + a1 + " apples";
results.add(apple1);
} else if (key.equalsIgnoreCase("mango")) {
List l1 = entry1.getValue();
for (int j = 0; j < l1.size(); j++) {
a2 = (int) l1.get(j);
}
mango1 = entry.getKey() + " " + a2 + " mangoes";
results.add(mango1);
} else if (key.equalsIgnoreCase("orange")) {
List l1 = entry1.getValue();
for (int j = 0; j < l1.size(); j++) {
a3 = (int) l1.get(j);
}
orange1 = entry.getKey() + " " + a3 + " oranges";
results.add(orange1);
}
}
System.out.println("Values = " + (values));
}
System.out.println("****" + results);
}
}
For an interview I would suggest the following as a first shot: iterate over the file. Split each line at commas using String.split(). If element 0 of the resulting array is identical to 2018-06-02, parse the integer in element 2 (the no of fruits sold) using Integer.parseInt() and add to the total count.
An obvious thing missing from such a first shot is input validation. May first check that there is at least one line in the file. Check that each line ends with a semicolon. Remove it and any space before it before splitting. Check that the length of the array is 4. Use the one-arg LocalDate.parse() for parsing the date on each line and Integer.parseInt() to parse both the number sold and the total number. Validate that the number sold is less than or equal to the total number. May also check that the name is that of a known fruit.
Another thing is data modelling. Design a fruit class with a name field and a fruit sales class with a date, a total number and a number sold, for example.

HashMap repeating the last element [duplicate]

This question already has answers here:
Why does my ArrayList contain N copies of the last item added to the list?
(5 answers)
Closed 5 years ago.
I am trying to create a HashMap in a HashMap so it will be easier for me to access elements of it in the future as shown below.
The problem is it only repeating the last elements of the while loop and not the rest of it.
HashMap<String,String> result = new HashMap<>();
HashMap<Integer, HashMap<String,String>> fr = new HashMap<>();
int i = 0;
try {
ResultSet rq = qexec.execSelect();
// ResultSetFormatter.out(System.out, rq, query);
// get result from SPARQL query
while (rq.hasNext()) {
QuerySolution soln = rq.next();
id = soln.getLiteral("?id").getLexicalForm();
//...
result.put("id",id);
//...
if (soln.getLiteral("?wateruse") != null) {
wateruse = soln.getLiteral("?wateruse").getLexicalForm();
//...
result.put("wateruse",wateruse);
} else {
System.out.println("NO");
}
fr.put(i, result);
i++;
}
} finally {
qexec.close();
}
This is how the result should be:
John001
High usage
John002
John003
Smith001
Moderate
Smith002
Smith003
...
Kevin001
Low usage
But fr only repeats Kevin001 and Low usage without the rest.
I've tried to put fr.put(i,result) outside the loop but that still does not give the correct result.
EDIT
I tried to print all elements from fr that shows the repeating elements.
finally {
qexec.close();
}
for (int index : fr.keySet()) {
for(Map.Entry<String, String> entry :result.entrySet()) {
System.out.println(index + " = " + entry.getKey() + " : " + entry.getValue());
}
}
UPDATE - SOLUTION
Declare HashMap inside the loop as mentioned in comments below.
To print nested HashMap, no need to use result.
I did as shown below and it prints both outermap and innermap as well.
for (int k=0; k < fr.size(); k++) {
HashMap<String,String> innermap = fr.get(k);
for(Map.Entry<String, String> e : innermap.entrySet()) {
System.out.println(k + " = " + e.getKey() + " : " + e.getValue());
}
}
You're adding the same result map to your parent map each time through the loop. Create a new instance of result each time through the loop:
Map<String, String> result = new HashMap<>();
Map<Integer, Map<String, String>> fr = new HashMap<>();
int i = 0;
try {
ResultSet rq = qexec.execSelect();
while (rq.hasNext()) {
// Create your new HashMap inside the loop:
result = new HashMap<>();
QuerySolution soln = rq.next();
id = soln.getLiteral("?id").getLexicalForm();
//...
result.put("id",id);
//...
if (soln.getLiteral("?wateruse") != null) {
wateruse = soln.getLiteral("?wateruse").getLexicalForm();
//...
result.put("wateruse",wateruse);
}
else {
System.out.println("NO");
}
fr.put(i,result);
i++;
}
}
To print the results from fr an its nested map, you can do something like this:
for (Map<String, String> map : fr.values()) {
for(Map.Entry<String, String> e : map.entrySet()) {
System.out.println(index + " = " + e.getKey()
+ " : " + e.getValue());
}
}
Try this a small change here, place the "result" map creation in while loop
Map<Integer, Map<String, String>> fr = new HashMap<>();
int i = 0;
try {
ResultSet rq = qexec.execSelect();
while (rq.hasNext()) {
Map<String, String> result = new HashMap<>();
QuerySolution soln = rq.next();
id = soln.getLiteral("?id").getLexicalForm();
//...
result.put("id",id);
//...
if (soln.getLiteral("?wateruse") != null) {
wateruse = soln.getLiteral("?wateruse").getLexicalForm();
//...
result.put("wateruse",wateruse);
}
else {
System.out.println("NO");
}
fr.put(i,result);
i++;
}
}
This for loop to print elemenets:
for (int i=0;i< fr.size();i++){
Map<String,String> element= fr.get(i);
// use the element here.
}

Unable to Add Elements to LinkedHashMap in Java [duplicate]

This question already has answers here:
Why does my ArrayList contain N copies of the last item added to the list?
(5 answers)
Closed 6 years ago.
I'm reading emails using JavaMail API and adding each message (along with sender, sent date etc) to a LinkedHashMap. Next I'm adding the LinkedHashMap to an ArrayList of LinkedHashMaps. However, the odd thing is that the entire Hashmapis being overwritten by the last entry.
I have the following code:
private ArrayList<LinkedHashMap<String, String>> readAllMsgsFromOutlook() throws FileNotFoundException, IOException, MessagingException
{
LinkedHashMap<String, String> msgsLinkedHashMap = new LinkedHashMap<String, String>();
ArrayList<LinkedHashMap<String, String>> msgsLinkedHashMapAsArrayList = new ArrayList<LinkedHashMap<String, String>>();
//String host = "smtp-mail.outlook.com";
String emailID = ..getEmail();
String password = ..getPassword();
Properties props = new Properties();
props.setProperty("mail.store.protocol", "imaps");
try {
Session session = Session.getInstance(props, null);
Store store = session.getStore("imaps");
store.connect("imap-mail.outlook.com", emailID, password);
Folder inboxFolder = store.getFolder("INBOX");
UIDFolder UID = (UIDFolder)inboxFolder;
Message[] msgs = null;
Flags seen = new Flags(Flags.Flag.SEEN);
FlagTerm unseenFlagTerm = new FlagTerm(seen, false);
msgs = inboxFolder.search(unseenFlagTerm);
System.out.println("Number of New Emails in Inbox: " + msgs.length + "\n");
String senderAsString = "";
String sentDateAsString = "";
String subjectAsString = "";
String contentAsString = "";
String UIDAsString = "";
for (int msgCounter = 0; msgCounter < msgs.length; msgCounter++)
{
System.out.println("Email #: " + (msgCounter + 1) + "\n");
Message msg = msgs[msgCounter];
long UIDAsLong = UID.getUID(msg);
Object content = msg.getContent();
if (content instanceof String)
{
System.out.println("Email is instance of String: \n");
Address[] sender = msg.getFrom();
senderAsString = sender[0].toString();
System.out.println("SENDER: " + senderAsString);
sentDateAsString = msg.getSentDate().toString();
System.out.println("SENT_DATE: " + sentDateAsString);
subjectAsString = msg.getSubject().toString();
System.out.println("SUBJECT: " + subjectAsString);
contentAsString = (String)content;
System.out.println("CONTENT: " + contentAsString);
UIDAsString = String.valueOf(UIDAsLong);
System.out.println("UID: " + UIDAsString);
System.out.println("\n");
}
else if (content instanceof Multipart)
{
System.out.println("Email is instance of Multipart");
Multipart mp = (Multipart)content;
BodyPart bp = mp.getBodyPart(0);
Address[] sender = msg.getFrom();
sentDateAsString = msg.getSentDate().toString();
subjectAsString = msg.getSubject();
contentAsString = bp.getContent().toString();
senderAsString = sender[0].toString();
System.out.println("SENDER: " + senderAsString);
System.out.println("SENT DATE: " + sentDateAsString);
System.out.println("SUBJECT: " + subjectAsString);
System.out.println("CONTENT: " + contentAsString);
UIDAsString = String.valueOf(UIDAsLong);
System.out.println("UID: " + UIDAsString);
System.out.println("\n");
}
msgsLinkedHashMap.put("sender", senderAsString);
msgsLinkedHashMap.put("sentDate", sentDateAsString);
msgsLinkedHashMap.put("subject", subjectAsString);
msgsLinkedHashMap.put("content", contentAsString);
msgsLinkedHashMap.put("UID", UIDAsString);
msgsLinkedHashMapAsArrayList.add(msgsLinkedHashMap);
}
} catch (Exception mex) {
// TODO Auto-generated catch block
mex.printStackTrace();
}
At this point the content that is added seems to be correct. For example, if I had 24 messages and the content was "msg1", "msg2", "msg3" etc then this system prints out the correct content.
However when I loop through the HashMap after the following closing brackets all I get is the 24th element. In other words, the system will always print "msg24" even for the first 23 elements in list in the following code:
for (int arrayListCounter = 0; arrayListCounter < msgsLinkedHashMapAsArrayList.size(); arrayListCounter++) {
LinkedHashMap<String, String> singleHashmapInArrayList = msgsLinkedHashMapAsArrayList.get(arrayListCounter);
String content = singleHashmapInArrayList.get("content");
System.out.println(">>> " + arrayListCounter + " : " + content);
// For some reason content is always equal to msg24 instead of msg1, msg2, msg3 etc. It seems like the 24th element is replacing all previous elements. But why?
}
return msgsLinkedHashMapAsArrayList;
}
I've been trying to figure out the problem for hours.
What am I doing wrong?
As you assigned msgsLinkedHashMap variable outside the loop you're always editing the same object and keep adding it's instance to the list. The solution is to move
Map<String, String> msgsLinkedHashMap = new LinkedHashMap<String, String>();
inside your for loop so you'll be creating new instance of Map on each iteration.

Is there a cap on the number of entry in a ConcurrentHashMap?

I am working to read a file of about 2 million entries. Not all are valid lines, but that's the cap. I am using a Map to store key value pairings from the file. I however find that the last term is at line 1932513. I am coding with eclipse, in Java, and went over to bump up the Xmx parameters in the eclipse.ini. This did not solve the problem. Here is the code I am working with:
BufferedReader bufferedRead = new BufferedReader(inputStream);
String data;
try {
while((data = bufferedRead.readLine()) != null) {
String[] meterReadings = data.split(";");
if("Date".equals(meterReadings[0])) continue;
/*
* Creating the key object using concatenation of date-time
*/
if(newApp.isEmpty(meterReadings)) continue;
List<Object> valueList = new ArrayList<Object>();
String[] subDate = meterReadings[0].split("/");
StringBuffer dateTime = new StringBuffer();
for(String s : subDate) {
dateTime.append(s + ":");
}
dateTime.append(meterReadings[1]);
for(int i=2; i < meterReadings.length -1; ++i) {
valueList.add(meterReadings[i]);
}
newApp.textMap.put(dateTime.toString(), valueList);
}
} catch (IOException e) {
log.error("Unable to read from file: ", App.DATA_DIR + App.FILENAME);
e.printStackTrace();
}
/*
* Checking to see if Map has been created
*/
System.out.println("*****************************************");
Set<String> newSet = newApp.textMap.keySet();
Object[] setArray = newSet.toArray();
System.out.println("The last term's key is : " + (String) setArray[setArray.length - 1]);
System.out.println(newApp.textMap.size());
log.info("The size of the reading is : ", newApp.textMap.size());
System.out.println("*****************************************");
}

Categories