• 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

interface spec.

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My B&S spec. says:

// Returns an array of record numbers that match the specified
// criteria. Field n in the database file is described by
// criteria[n]. A null value in criteria[n] matches any field
// value. A non-null value in criteria[n] matches any field
// value that begins with criteria[n]. (For example, "Fred"
// matches "Fred" or "Freddy".)
public int [] find(String [] criteria)

I personally think this method should run with case-insensitive, since that would be more useful. However, the spec. does not seem to suggest so.

I wonder how you implement your search: case sensitive or insensitive? If case sensitive, how do you make sure that when user searches for "roofing", you also return "Roofing" (otherwise it would be user unfriendly)?

Thanks.
Yan
 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure about your spec but mine says EXACT MATCH for searches(which means you need to do some magic before you display the search results). There is a string method int compareToIgnoreCase(String str) if you wish to use it as an optional feature. Remember the MUST requirements if you dont have it you will be docked.
[ October 25, 2004: Message edited by: Inuka Vincit ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic