public abstract class QuantityConversionException extends Exception
getLocalizedMessage()
for error dialogs.Modifier and Type | Class and Description |
---|---|
static class |
QuantityConversionException.Persisted |
static class |
QuantityConversionException.Problem |
static class |
QuantityConversionException.Quantity |
Modifier and Type | Field and Description |
---|---|
protected String |
badString |
protected QuantityConversionException.Problem |
problem |
Modifier | Constructor and Description |
---|---|
protected |
QuantityConversionException(QuantityConversionException.Problem problem,
String badString) |
Modifier and Type | Method and Description |
---|---|
static <Q extends IQuantity> |
belowPrecision(Q badValue,
Q precisionLimit) |
static <T extends Comparable<T>> |
belowPrecision(T badValue,
T precisionLimit,
IPersister<T> persister) |
static QuantityConversionException |
conflictingConstraints(Object value,
String key) |
String |
getBadString()
The string where the problem was encountered, so that it might be highlighted.
|
abstract String |
getInteractivePrototype()
Prototype value suitable to be presented to a human.
|
String |
getLocalizedMessage() |
String |
getMessage() |
abstract String |
getPersistablePrototype()
Prototype value suitable to be persisted or logged.
|
QuantityConversionException.Problem |
getProblem()
The kind of problem encountered.
|
static QuantityConversionException |
noUnit(String badString,
IQuantity prototype) |
static <T extends Comparable<T>> |
noUnit(String badString,
T prototype,
IPersister<T> persister) |
static <Q extends IQuantity> |
tooHigh(Q badValue,
Q max) |
static <T extends Comparable<T>> |
tooHigh(T badValue,
T max,
IPersister<T> persister) |
static <Q extends IQuantity> |
tooLow(Q badValue,
Q min) |
static <T extends Comparable<T>> |
tooLow(T badValue,
T min,
IPersister<T> persister) |
String |
toString() |
static QuantityConversionException |
unknownUnit(String badString,
IQuantity prototype) |
static <T extends Comparable<T>> |
unknownUnit(String badString,
T prototype,
IPersister<T> persister) |
static QuantityConversionException |
unparsable(String badString,
IQuantity prototype) |
static <T extends Comparable<T>> |
unparsable(String badString,
T prototype,
IPersister<T> persister) |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected final QuantityConversionException.Problem problem
protected final String badString
protected QuantityConversionException(QuantityConversionException.Problem problem, String badString)
public static <T extends Comparable<T>> QuantityConversionException unparsable(String badString, T prototype, IPersister<T> persister)
public static <T extends Comparable<T>> QuantityConversionException noUnit(String badString, T prototype, IPersister<T> persister)
public static <T extends Comparable<T>> QuantityConversionException unknownUnit(String badString, T prototype, IPersister<T> persister)
public static <T extends Comparable<T>> QuantityConversionException tooLow(T badValue, T min, IPersister<T> persister)
public static <T extends Comparable<T>> QuantityConversionException tooHigh(T badValue, T max, IPersister<T> persister)
public static <T extends Comparable<T>> QuantityConversionException belowPrecision(T badValue, T precisionLimit, IPersister<T> persister)
public static QuantityConversionException unparsable(String badString, IQuantity prototype)
public static QuantityConversionException noUnit(String badString, IQuantity prototype)
public static QuantityConversionException unknownUnit(String badString, IQuantity prototype)
public static <Q extends IQuantity> QuantityConversionException tooLow(Q badValue, Q min)
public static <Q extends IQuantity> QuantityConversionException tooHigh(Q badValue, Q max)
public static <Q extends IQuantity> QuantityConversionException belowPrecision(Q badValue, Q precisionLimit)
public static QuantityConversionException conflictingConstraints(Object value, String key)
public QuantityConversionException.Problem getProblem()
QuantityConversionException.Problem
values, never nullpublic String getBadString()
public abstract String getPersistablePrototype()
public abstract String getInteractivePrototype()
public String getMessage()
getMessage
in class Throwable
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
Copyright © 2020. All rights reserved.