This week's book giveaway is in the XML and Related Technologies forum.
We're giving away four copies of Java XML & JSON and have Jeff Friesen on-line!
See this thread for details.
Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

how to set a intelvall on what to be loaded in a tableview of postal areas  RSS feed

Posts: 16
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i have a list of objects that represent postal areas, the postal class have two String properies postalnumber and postalname. i'm making a feature to seach for s spesiffic postal area and you can seach on both name and number. my problem now is i'm trying to add a som more for the postal feature to can specify a intervall of postal numbers that vil be shown. for example: i want to see all postal numbers from postalnumber 1256 to postal number 3678. any idea of i can accomplished this task? have tried to stream the list and add a filter, my problem is that the postalnumber is a string
Master Rancher
Posts: 1043
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could loop your list of object with a for each.
in your loop check wit an if statement if the parsed to an integer value of your zipcode is between or equal to 1256 and 3678

All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!