• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to extract the name-value pairs?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would be very pleased if anyone could tell me how to
extract the name-value pairs for the findCriteria(..) method.
I was trying to do it by hand, but I'm sure there must be some
standard way to do things like this.
Thanks in advance,

Greetings Ludo
 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out StringTokenizer class. It basically creates an enumeration of the tokens inside a delimited string.
i.e.:
StringTokenizer st = new StringTokenizer("A=1,B=2,C=3",",")
Whilte (st.hasMoreTokens())
{
System.out.println(st.nextToken())
}
Would give you the following output:
A=1
B=2
C=3

 
reply
    Bookmark Topic Watch Topic
  • New Topic