Enum TransactionSubjects
- java.lang.Object
-
- java.lang.Enum<TransactionSubjects>
-
- org.cyclos.model.banking.transactions.TransactionSubjects
-
- All Implemented Interfaces:
Serializable,Comparable<TransactionSubjects>
public enum TransactionSubjects extends Enum<TransactionSubjects>
Reference to none, one of (from or to) or both subjects of a transaction (or transfer)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisFrom()Returns whether the from subject is referencedbooleanisTo()Returns whether the to subject is referencedstatic TransactionSubjectsof(boolean from, boolean to)static TransactionSubjectsvalueOf(String name)Returns the enum constant of this type with the specified name.static TransactionSubjects[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final TransactionSubjects NONE
Reference to none of the transaction subjects
-
FROM
public static final TransactionSubjects FROM
Reference to the transaction from
-
TO
public static final TransactionSubjects TO
Reference to the transaction to
-
BOTH
public static final TransactionSubjects BOTH
Reference to both from and to subjects of the transaction
-
-
Method Detail
-
values
public static TransactionSubjects[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TransactionSubjects c : TransactionSubjects.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TransactionSubjects valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
of
public static TransactionSubjects of(boolean from, boolean to)
-
isFrom
public boolean isFrom()
Returns whether the from subject is referenced
-
isTo
public boolean isTo()
Returns whether the to subject is referenced
-
-