Results 1 to 4 of 4
  1. #1
    Dipke is offline Member
    Join Date
    Aug 2010
    Location
    Leuven, Belgium
    Posts
    86
    Rep Power
    0

    Default list, set or map ?

    Hello,

    I have a collection of projects.
    A project contains a projectname, customername, adress, contractnr, startdate, duration, ......
    The intention is to show them into a calendarview.
    There are about 50 projects a year.
    The projects are serialized.

    Do i have to put them into an arraylist, hashset or a map ?

    Kind regards

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,560
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Dipke View Post
    Hello,

    I have a collection of projects.
    A project contains a projectname, customername, adress, contractnr, startdate, duration, ......
    The intention is to show them into a calendarview.
    There are about 50 projects a year.
    The projects are serialized.

    Do i have to put them into an arraylist, hashset or a map ?

    Kind regards
    Do you have duplicate projects in your collection? If so use a List otherwise a Set is fine. If you want to associate the projects with something use a Map.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    m00nchile is offline Senior Member
    Join Date
    Feb 2010
    Location
    Ljubljana, Slovenia
    Posts
    470
    Rep Power
    5

    Default

    Exactly, look up the APIs for the List, Map and Set interfaces, get familiar with their their modus operandi, it should become pretty clear what interface to use in certain contexts.
    Ever seen a dog chase its tail? Now that's an infinite loop.

  4. #4
    Dipke is offline Member
    Join Date
    Aug 2010
    Location
    Leuven, Belgium
    Posts
    86
    Rep Power
    0

    Default

    Hello,

    Thanks for the answers,

    Now i have an idea of what using.

    Kind regards

Similar Threads

  1. Replies: 2
    Last Post: 11-22-2009, 05:24 PM
  2. Replies: 3
    Last Post: 11-21-2009, 05:48 PM
  3. how to create list of list in java ???
    By ilayaraja in forum Advanced Java
    Replies: 1
    Last Post: 10-26-2009, 04:30 PM
  4. Linked List integer list
    By igniteflow in forum Advanced Java
    Replies: 1
    Last Post: 12-10-2008, 08:53 PM
  5. How to access ArrayList in List of List?
    By alvations in forum New To Java
    Replies: 5
    Last Post: 10-08-2008, 12:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •