Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
2 votes
1 answer
85 views

Defining a finite set of instances of a class to check against [closed]

I have a Type class that will have many instances. I get the instances from a web service. The Type class has a ...
user8297969's user avatar
6 votes
2 answers
266 views

Opposite access to enums

Consider I have many enums (Java) that looks somewhat like this: ...
Hallel's user avatar
  • 163
4 votes
0 answers
70 views

Implementing a StringEnum

This is to be used like an Enum (as parameter mostly), but for string (Using .NET 3.5) Actual implementation: ...
Fredou's user avatar
  • 385
-2 votes
1 answer
402 views

Enum Singleton implementation in Java

I just wanted to implement the enum singleton in java. Here is my implementation where I have tried to create a singleton DataSource instance: ...
Rahul's user avatar
  • 11
3 votes
1 answer
143 views

An attempt to extend an enum to prevent branching without violating the Open-Closed principle

I love making utility State enums, and giving them methods that do useful things based on which instance of the enum is provided. This works when the enum is very specific to the class I'm working on, ...
durron597's user avatar
  • 918