Questions tagged as 'enums'

1
answer

Enum is expanded by the compiler into a class declaration?

Does Enum expand by compiler into a class declaration in Java?     
asked by 08.12.2016 / 14:23
2
answers

Map Enum with search conditions

I have a class that does the search conditions as follows: public enum EnumCondicao { [Display(Name = "Igual")] Igual, [Display(Name = "Diferente")] Diferente, [Display(Name = "Maior")] Maior, [Display(Name = "Menor...
asked by 03.05.2017 / 03:11
1
answer

Can enumerations contain methods?

I do not know if the term is this, "abstract methods in a enum ". My question came after seeing this implementation in code review . Until then I had never seen this kind of thing in any tutorial or article pertaining to enum...
asked by 12.12.2014 / 07:21
2
answers

Static enum constants

enum Animals { DOG("woof"), CAT("meow"), FISH("burble"); String sound; Animals(String s) { sound = s; } } class TestEnum { static Animals a; public static void main(String[] args) { System.out.printl...
asked by 15.12.2015 / 01:11
1
answer

What is the size of an enum in C?

In general, the enum stores an integer, can I consider that this is the size of it?     
asked by 26.01.2017 / 11:42
1
answer

How to check enumerator value with [Flags]?

I have my enumerator: [Flags] public enum EConta { Receber = 1, Pagar = 2, Cobrada = 3, Atrazada = 4 } and I have the assignment EConta conta = EConta.Receber | EConta.Pagar; var retorno = EConta.Cobrada How do I compare if...
asked by 21.04.2015 / 16:06
1
answer

Compiler indicates non existent enum that exists

I'm using the Mono compiler. When I tried to compile this: using static System.Globalization.CharUnicodeInfo; using static System.Globalization.UnicodeCategory; namespace AS3Kit.Lexical { static class Validator { static bool T...
asked by 12.12.2017 / 00:17
2
answers

What is the difference between the data types enum, struct and union in C?

I'm reading the GNU C manual and I'm in the Data Types section and I notice a certain similarity between% types of%,% with%, and% with%. Is the syntax the same, or is there something that differs between them? In which cases should I use which...
asked by 27.06.2016 / 19:59
1
answer

HQL query with list of ENUM as parameter

Hello, I have the following problem, here is an example: I have an entity Banda that has as attribute a list of genres List<Generos> generos , Generos is an ENUM with the following values: ALTERNATIVE_ROCK("Altern...
asked by 31.12.2014 / 03:43
1
answer

In an MVC project, where should I leave the enums?

I'm developing a program with MVC standard, I needed to create some enum , and I left them in the Model layer, but I was in doubt about its location, what would be the correct layer to house the enum of a project?     
asked by 03.06.2016 / 21:49