public enum ExchangeFactory extends Enum<ExchangeFactory>
Factory to provide the following to Exchange
:
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
Exchange |
createExchange(ExchangeSpecification exchangeSpecification) |
Exchange |
createExchange(String exchangeClassName)
Create an Exchange object.
|
static ExchangeFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExchangeFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExchangeFactory INSTANCE
public static ExchangeFactory[] values()
for (ExchangeFactory c : ExchangeFactory.values()) System.out.println(c);
public static ExchangeFactory valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Exchange createExchange(String exchangeClassName)
The factory is parameterised with the name of the exchange implementation class. This must be a class extending
Exchange
.
exchangeClassName
- the fully-qualified class name of the exchangeExchangeSpecification
public Exchange createExchange(ExchangeSpecification exchangeSpecification)
Copyright © 2012–2016 Xeiam, LLC. All rights reserved.