• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

StringTokenizer "Key/Value" Pair Question?

 
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
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Integer class. especially the parseInt(String s) method.
Mark
 
His brain is the size of a cherry pit! About the size of this ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic