Search:

Type: Posts; User: ober0330

Page 1 of 2 1 2

Search: Search took 0.28 seconds.

  1. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    Done, sorry, forgot about that.
  2. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    I did that, and I watched it in debug in Eclipse and it's just replacing the key/value with the new value.

    Regardless, I changed it and I'm just using a HashSet of concatenated strings now. It's...
  3. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    You can't even see how frustrating those answers you give might be? Do you even understand what I said?

    Obviously the situation can vary greatly and every answer you might give might not be the...
  4. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    See, there you go again.

    "That's definitely NOT the best way to go, but I'm sure as hell not going to give you a better way. Why would I help my fellow programmer become better at what he's...
  5. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    You want to talk about attitude? Here's the attitude I get EVERY time I come to this forum:

    Me: Post Question
    Someone else: Your code tells me nothing and I'm not even going to bother to guess...
  6. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    Screw it, I'm just going to concatenate the two items and build an arraylist.
  7. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    Could you be more generic in your responses?

    If there is a better way, why wouldn't you tell me? I thought the point of this board was to help people, not make philosophical statements about...
  8. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    So is there a better way to do this? Or are you saying create a map with the value being a list? Is that even possible?
  9. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    Ok, so let me ask a more generic question then:

    I'm processing a set of objects. Each object can have different states throughout the process. The user can setup notifications so that when an...
  10. Replies
    20
    Views
    820

    [SOLVED] Re: Map not checking for values properly

    Hi Kevin,

    I'm not sure what else you might need. I gave you the code that is causing the problem. I was hoping the problem might just be with the else if portion. Like maybe I'm not checking...
  11. Replies
    20
    Views
    820

    [SOLVED] Map not checking for values properly

    I apparently don't understand how to check for existing values in a Map.

    I have this:


    private Map<String, String> priorChecks = new LinkedHashMap<String, String>();
    boolean...
  12. Replies
    1
    Views
    495

    key with 2 attributes?

    What I want is something like this:

    Map<String, Double, String>

    Where the first is a key, and the second 2 are attributes of that key. What is the best object for this setup?
  13. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Yeah. Not worth it for this instance. If it would be something different, it might be worth exploring.
  14. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Well yeah, so maybe what I'm looking for is a map that is extended for this purpose.

    You'd get a error if you tried to pass in a non-string... not sure what you're getting at?
  15. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Take the new value, add it to the existing value for the provided key.
  16. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Well yeah, I understand how the map works. I guess what I want is:

    mymap.add("key", value);

    And that doesn't seem to exist. And I guess it makes sense that it wouldn't be there by default...
  17. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Well, it obviously has many methods, but it doesn't seem to have another method for adding a value to an existing key. I guess I could use put to add the existing value of that key to the new value...
  18. Replies
    12
    Views
    2,194

    Re: Adding value to existing map key

    Nevermind. I think I'm over-complicating it because now I have to check to see if the key exists or not... gah. Not worth it.
  19. Replies
    12
    Views
    2,194

    Adding value to existing map key

    So I have a map:

    Map<String, Integer> totals = new LinkedHashMap<String, Integer>();

    I'm going to have about 6 running totals and I figured rather than creating 6 different variables, why not...
  20. Replies
    9
    Views
    1,066

    Re: constructor X is undefined

    So then why does the exact same code work for another class?

    I guess I have to ask another developer within the company... I hate working in a different office from the rest of them.
  21. Replies
    9
    Views
    1,066

    Re: constructor X is undefined

    Hence my thought that it's probably this one:

    public GeneralClickList(T o){
    super();
    this.add(o);
    }

    Using a generic instead of specifying it.

    I call it using this:...
  22. Replies
    9
    Views
    1,066

    Re: constructor X is undefined

    I guess I'm not sure what you mean by 'how are you calling the constructor'? Maybe I'm just slow today.

    Here are all the constructors for the class:

    public class GeneralClickList<T extends...
  23. Replies
    9
    Views
    1,066

    Re: constructor X is undefined

    Error: The constructor GeneralClickList<DCNotification>(Vector<DCNotification>) is undefined

    Constructor (I think... there are several):
    public GeneralClickList(Collection<? extends T> c) {
    ...
  24. Replies
    9
    Views
    1,066

    constructor X is undefined

    I'm copying some code from another location and I'm confused about something that isn't working:

    return new GeneralClickList<DCNotification>((Vector<DCNotification>)...
  25. Replies
    15
    Views
    3,818

    Re: substring with negative endIndex

    Well since I explained that I'm not a n00b, things have turned 180. And maybe I was reading the wrong way before.
Results 1 to 25 of 40
Page 1 of 2 1 2