Class TransferDecision
java.lang.Object
com.ultikits.ultitools.ui.TransferDecision
Immutable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final TransferDecisionprivate final intprivate final @Nullable Textprivate static final TransferDecision -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TransferDecisionallow()Allows the whole requested amount.static TransferDecisionallowAtMost(int amount) Allows at mostamount(non-negative; 0 refuses).intallowedAmount(int requested) The allowed part ofrequested.message()The refusal message, if any.static TransferDecisionrefuse()Refuses without a message.static TransferDecisionRefuses and sendsmessageto the viewer (rendered in their locale).
-
Field Details
-
ALLOW
-
REFUSE
-
limit
private final int limit -
message
-
-
Constructor Details
-
TransferDecision
-
-
Method Details
-
allow
Allows the whole requested amount. -
allowAtMost
Allows at mostamount(non-negative; 0 refuses). @throws IllegalArgumentException if negative -
refuse
Refuses without a message. -
refuse
Refuses and sendsmessageto the viewer (rendered in their locale). -
allowedAmount
public int allowedAmount(int requested) The allowed part ofrequested. @throws IllegalArgumentException if requested is negative -
message
-