Questions tagged as 'enum'

1
answer

Create enum in Java from the .properties file

Is it possible to load values for an enum from the .properties file? into an enum. I have the following information in the file called secure.properties: authorization-api-context=http://localhost:8099/ mongo-db-name=secure defaul-countries...
asked by 03.07.2016 / 02:44
1
answer

Problem with the enums

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ejercicio_2 { class Program { enum direcion { arriba=1,abajo=3,derecha=2,izquieda=4}; static void Main(stri...
asked by 16.10.2018 / 10:44
1
answer

Are there enums nested in Java?

I want to make an enum of countries to which you can access their states, something similar to this: public enum SomeEnum { ARGENTINA { BUENOS_AIRES; } UNITED_STATES { CALIFORNIA, FLORIDA, NEW_YORK, ALASKA;...
asked by 05.10.2016 / 15:07
4
answers

Error compiling "request for member 'size' in '* (int *) (& Dia)"

I have implemented a code for an enum that contains the days of the week, the problem that I get is with the function size() , I do not understand much the error, I tried to use a pointer to end() , but not I get nothing. Here is the...
asked by 13.10.2018 / 15:55
1
answer

Extract the value of an enum class

I try to get the value of an enum class When ordering a whole number by console, the code would be something like this: //metodo class public enum TipoDeMadera { ROBLE,CAOBA; } //metodo main System.out.println("introduzca un numero p...
asked by 28.11.2017 / 05:40
1
answer

I need to treat an enumerated as if it were an array in a jsp with jstl

For now I am loading the elements of the list manually, but I would like to know if you can go through any of the components provided by JSTL ( c:forEach for example), because in the enum I have 3 options, but imagine if there are 500 opt...
asked by 27.03.2018 / 20:24
2
answers

Combine Arrangements with Enum [duplicate]

I have an enumeration with the months, something like that enum Meses { Enero, Febrero, [...], Diciembre }; I have an arrangement, where I store entire data. Now, what I need to do is something like for (int i = 0; i < n; i++) //...
asked by 21.10.2018 / 19:55
2
answers

How to show in JOptionPane, a tribute of an enum

I'm using enums and JOptioPane, and I want to show the enum attribute, (I mean a string), this is what I have: public Cities readCityOrigen() { Cities [] listCityOrigen = Cities.values(); Cities city = (Cities) JOptionPane.showInputDia...
asked by 22.10.2016 / 03:55
1
answer

How to implement Enum in java, poo

I'm starting to see the issue of enum in java and I have an exercise in which I'm asked to check which quadrant of the Cartesian plane are certain points, these points are stored in an ArrayList and the teacher told me to Through a enu...
asked by 27.09.2018 / 05:50
1
answer

Select the first 7 elements of an enum and display them in a Combobox using datasource

I have an enum that, public enum Region { euw, na, br, lan, ru, oce, tr, jap, } The thing is that I would like to show the first 7 elements, or what is the same, all except the last one. Currently with comboBox1.DataSource = Enum.GetVa...
asked by 13.08.2018 / 09:59