-
How do we know the size of an enumeration? (9 messages)
- Posted by: Janice Wong
- Posted on: October 23 2000 13:34 EDT
Is that any method we can use to return the size of an enumeration (without looping through it)? Thank you.
Regards,
JaniceThreaded Messages (9)
- How do we know the size of an enumeration? by Web Master on October 23 2000 15:38 EDT
- How do we know the size of an enumeration? by Prashanth Ramesh on October 23 2000 18:06 EDT
- How do we know the size of an enumeration? by Amir Yasin on October 24 2000 00:04 EDT
- How do we know the size of an enumeration? by Rankin Johnson on June 25 2011 16:38 EDT
- what is maxium value by Shawna Debusk on March 17 2012 06:39 EDT
- what is your suggestion for the enumeration size? by Rose Russel on April 03 2012 08:16 EDT
- what is maxium value by Shawna Debusk on March 17 2012 06:39 EDT
- get size of enumertion in java by zanga ponga on September 11 2012 14:24 EDT
- As a type of research primary market research by mike rogerson on October 18 2012 09:20 EDT
- Hi all there by William k Obrien on November 05 2012 01:18 EST
-
How do we know the size of an enumeration?[ Go to top ]
- Posted by: Web Master
- Posted on: October 23 2000 15:38 EDT
- in response to Janice Wong
There is no such method like size() to know the size of Enumerations(Unlike Collection API method - size()) .
If you are using Enumerations with JDBC result sets then you could probably use the last() and the first() methods to know the size of the result set. -
How do we know the size of an enumeration?[ Go to top ]
- Posted by: Prashanth Ramesh
- Posted on: October 23 2000 18:06 EDT
- in response to Web Master
If you want to know the size,you can always declare a temporary array and place all the elements in the array by using the methods hasMoreElements() and nextElement().
And then use the size() method of the array.
-
How do we know the size of an enumeration?[ Go to top ]
- Posted by: Amir Yasin
- Posted on: October 24 2000 00:04 EDT
- in response to Janice Wong
Enumerations don't have a size as they don't contain anything. You can get the size of the container, but an enumeration is essentially a const(in terms of the refrence not the object) iterator. Its responsibiliy is to know where the next item is. If you have a handle to the container being iterated I would suggest checking to see if it has a size method (most do).
Hope that helps :) -
How do we know the size of an enumeration?[ Go to top ]
- Posted by: Rankin Johnson
- Posted on: June 25 2011 16:38 EDT
- in response to Janice Wong
given -
enum Widgets {TINY, SMALL, AVERAGE, BIG};
the size of Widgets is:
Widgets.values().length
-
what is maxium value[ Go to top ]
- Posted by: Shawna Debusk
- Posted on: March 17 2012 06:39 EDT
- in response to Rankin Johnson
Howdy, Rankin
what is maxium value of the Widgets?
-
what is your suggestion for the enumeration size?[ Go to top ]
- Posted by: Rose Russel
- Posted on: April 03 2012 08:16 EDT
- in response to Shawna Debusk
hi, all there.
what is your suggestion for the enumeration size for the properly running?
-
get size of enumertion in java[ Go to top ]
- Posted by: zanga ponga
- Posted on: September 11 2012 14:24 EDT
- in response to Janice Wong
you can just do
Collectios.list(enumerationName).size()
to get the size of the enumerationName
-
As a type of research primary market research[ Go to top ]
- Posted by: mike rogerson
- Posted on: October 18 2012 09:20 EDT
- in response to zanga ponga
As a type of research primary market research takes a lot of time, by hiring a management consultant they would be able to conduct an in-depth research which would provide conclusive and empirical results. wealth management
-
Hi all there[ Go to top ]
- Posted by: William k Obrien
- Posted on: November 05 2012 01:18 EST
- in response to Janice Wong
#include <stdlib.h>
#include <stdio.h>
enum some_enum
{
garbage1,
garbage2
};
int main(void)
{
enum some_enum some_val;
printf("size: %lu\n", sizeof(some_val));
return EXIT_SUCCESS;
}
Hope this code helps
<a href="http://mensdresspantsz.com">Mens Dress pants</a>