Done, sorry, forgot about that.
Type: Posts; User: ober0330
Done, sorry, forgot about that.
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...
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...
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...
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...
Screw it, I'm just going to concatenate the two items and build an arraylist.
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...
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?
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...
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...
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...
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?
Yeah. Not worth it for this instance. If it would be something different, it might be worth exploring.
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?
Take the new value, add it to the existing value for the provided 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...
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...
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.
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...
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.
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:...
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...
Error: The constructor GeneralClickList<DCNotification>(Vector<DCNotification>) is undefined
Constructor (I think... there are several):
public GeneralClickList(Collection<? extends T> c) {
...
I'm copying some code from another location and I'm confused about something that isn't working:
return new GeneralClickList<DCNotification>((Vector<DCNotification>)...
Well since I explained that I'm not a n00b, things have turned 180. And maybe I was reading the wrong way before.