• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can i count this variables in my DB?  RSS feed

 
Mike Redford
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone please help me this is very important to me ...

this is my source code :



this source code is correct but it's not complete please help me
right now output is :


how can i add count of ZHTYPE to this? ZTYPE is one of this : TCH_HLF or TCHFULL or TCHSD example file :
4 shared --> /file/210566155/c080d93a/db_online.html


such as this output :



* Each XTSM has 3 XTS (0-2)
* Each XTS has 4 XRX (0-3)
* Each XRX has 8 XCHAN (0-7)
* and Each line has a type of ZHTYPE


thank you very much indeed ...
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you create a class for each type? That will improve cohesion and then you can get rid of the TreeMap<Integer, TreeMap<Integer, Integer>> xtsmMap = new TreeMap<Integer, TreeMap<Integer, Integer>>();
 
Mike Redford
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouter Oet wrote:Why don't you create a class for each type? That will improve cohesion and then you can get rid of the TreeMap<Integer, TreeMap<Integer, Integer>> xtsmMap = new TreeMap<Integer, TreeMap<Integer, Integer>>();


hi thanks

could you please show me with code?
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I can but why don't you try it first.
 
Mike Redford
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouter Oet wrote:Yes I can but why don't you try it first.

OK thanks but i have this error :

Are You online right now?

This is my example file (Updated !!!) :

 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!