Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

StringTokenizer "Key/Value" Pair Question?

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
My criteriaFind() method is working fine,but it is only limited to the Origin & Destination Fields.What i have to do, to make my
citeriaFind() method generic.With the help of StringTokenizer
i am getting the "Key/Value" pair in a form of String values.How to convert my Key according to the Field.Because in find method
values[]=readRecord(); it requires values[Key].equals(Value).
Here Key is required as an Int value but StringTokenizer is returning Key as a String,Plz help me out to solve this problem how to convert my Key value to a specific field(Int) value.
Anurag Mishra
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Integer class. especially the parseInt(String s) method.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic