Group dot separated sting to fixed format
can someone give me some pointers for this?
I have dot -separate tree hierarchy
323-060
040
030
As a result, I have the next lines
"323-060"
"323-060.040"
"323-060.040.030"
So, in the input I got the next lines:
“323-060″,
323-060.040″,
323-060.040.030”,
323-060.088″,
323-060.088.020″,
323-060.010″,
323-060.010.080″,
323-060.010.080.020″,
323-060.010.080.060″
As a result I have to get the next:
323-060323-060.040323-060.040.030
323-060323-060.088323-060.088.020
323-060323-060.010323-060.010.080323-060.010.080.020
323-060323-060.010323-060.010.080323-060.010.080.060
How to do it in Java ?