Most voted "enums" questions
A type of data consisting of a set of named values, called elements, members or Enumerators of the type. The tag can be used whenever this data type is used language-independent. Do not use Enum-java or other variation to indicate that it is about the Enum of a language. The individual tag of the language will indicate this.
Learn more…115 questions
Sort by count of
-
0
votes1
answer295
viewsEnum returns null from the database
Hello, I’m implementing a DAO and doing some tests, I’m having some problems in enums. When running the test class the Enum Size returns null, but in the database I have records filled correctly.…
-
0
votes1
answer61
viewsAn alternative to Strings?
Several things in the project have a table with possible names (strings). But I don’t want to use strings to make comparisons for various reasons (case-sensitive, typo, name table changes, etc). So…
-
0
votes2
answers318
views -
0
votes1
answer76
viewsIs there any way to reference an Enum inside itself in Python?
I would like to use a constant I created in an Enum as an attribute of another, for example: from enum import Enum class Jokenpo(Enum): PEDRA = ('Rock', [Jokenpo.PAPEL], [Jokenpo.TESOURA]) PAPEL =…
-
0
votes1
answer221
viewsHow to organize Enum in an Ionic 3 project
I have a group of static messages for form field validation. These messages are present throughout the application and so I would like to use some way to make them dynamic and organized within the…
-
0
votes1
answer212
viewsSending numeric value of an Enum by HTTP request in Java
I have a problem in my system, in my back-end in Java com Spring Boot I have a class that has a property that’s kind of a Enum that I created, and my Front-end which is in Angular when making a…
-
0
votes1
answer90
viewsField of type ENUM empty arrow when not a valid value
Test scenario Data set: 10.4.11-Mariadb Table: tabela Campos: id (INT, PK, NOT NULL), ativo (ENUM('S','N'), NOT NULL) Instruction UPDATE tabela SET ativo = 'XXX' WHERE id = 1 Return 1 Row(s)…
-
0
votes1
answer43
viewsHow to reuse an Enum on other screens containing some different properties
I’m working with a screen "Financial" and another screen "Financial Report". For the Financial screen, I created an Enum with the options "Accounts Payable and Receivables". public enum…
-
0
votes1
answer39
viewsError converting an Enum
Good evening guys, I’m new in C# and would like if possible a help, I created an Enum with client codes and I’m trying to pass its value through a validation and I’m getting string to int conversion…
-
0
votes2
answers25
viewsHow to instantiate a class with predefined and immutable parameters C#
How to instantiate this class jogo? public class Jogo { public string Name { get; set; } public string Genre { get; } public string Plataform { get; } public Jogo(string name, string genre, string…
-
0
votes3
answers95
viewsPass Enum value per method parameter
I have a value that stores the status of an element. For example: 1 - sending 2 - Cancelled 3 - Error. The value that will be saved in the database is the numeric value. I have a method that sets…
-
-1
votes2
answers254
viewsUsing Enum in Java
Hey there, guys. The program should randomly generate a "Heads" or "Tails" value, but using Enum. It is not clear to me how to implement the statement below using Enum. Can someone give me a light?…
-
-2
votes1
answer125
viewsI need help in java
I am migrating a desktop application in Delphi to java, and in Delphi there is a class that persists in the database the values 00, 10, 20 and 30. I’m making a java Enum to persist the values. I…
-
-4
votes2
answers101
viewsI need an explanation for the error in this C++ script
#include <iostream> #include <string> struct Brinquedos{ enum Objetos {Bola, Carrinho, Caixa, Dinamite}; void func(int st_Bola, int st_Carrinho, int st_Caixa, int st_Dinamite){…
-
-4
votes1
answer240
viewsHow to use Enum with hierarchy / nesting and subgroup
I have a enum class called Example as follows: export enum Example { // enums pertercentes ao grupo A: enumA1, enumA2, enumA3, // enums pertercentes ao grupo B: enumB1, enumB2, enumB3, // enums…