java.lang.Object java.lang.Enum<IPrimeCollection.PrintOption> de.luschny.math.primes.IPrimeCollection.PrintOption
public static enum IPrimeCollection.PrintOption
Three options for formatting the list of primes when printing them to a file.
Enum Constant Summary | |
---|---|
CommaSeparated A comma-separated list of the prime numbers in the collection. |
|
FormattedText
A formated table of the prime numbers in the collection. |
|
Xml
The prime numbers as pairs (ordinal, prime) in Xml-format. |
Method Summary | |
---|---|
static
IPrimeCollection.PrintOption |
valueOf(java.lang.String
name) Returns the enum constant of this type with the specified name. |
static
IPrimeCollection.PrintOption[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode,
name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final IPrimeCollection.PrintOption CommaSeparated
Example output: 2,3,5,7,...
public static final IPrimeCollection.PrintOption FormattedText
Example output: SieveRange [100,333] : 234 PrimeRange [ 26, 67] : 42 PrimeDensity 0.1794871794871795 <26.> 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 <47.> 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 <63.> 307 311 313 317 331
public static final IPrimeCollection.PrintOption Xml
Example output: (26,101) (27,103) (28,107)
Method Detail |
---|
public static IPrimeCollection.PrintOption valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type
has no constant with the specified name java.lang.NullPointerException
- if the argument is nullpublic static IPrimeCollection.PrintOption[] values()
for (IPrimeCollection.PrintOption c : IPrimeCollection.PrintOption.values()) System.out.println(c);