/** * Returns the result of {@link #getByteValue(Literal, byte) * getByteValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static byte getByteValue(Value v, byte fallback) { if (v instanceof Literal) { return getByteValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getDoubleValue(Literal, double) * getDoubleValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static double getDoubleValue(Value v, double fallback) { if (v instanceof Literal) { return getDoubleValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getIntegerValue(Literal, BigInteger) * getIntegerValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static BigInteger getIntegerValue(Value v, BigInteger fallback) { if (v instanceof Literal) { return getIntegerValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getLabel(Literal, String) * getLabel((Literal)v, fallback} in case the supplied value is a literal, * returns the fallback value otherwise. */ public static String getLabel(Value v, String fallback) { return v instanceof Literal ? getLabel((Literal)v, fallback) : fallback; }
/** * Returns the result of {@link #getIntValue(Literal, int) * getIntValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static int getIntValue(Value v, int fallback) { if (v instanceof Literal) { return getIntValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getLongValue(Literal, long) * getLongValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static long getLongValue(Value v, long fallback) { if (v instanceof Literal) { return getLongValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getDecimalValue(Literal, BigDecimal) * getDecimalValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static BigDecimal getDecimalValue(Value v, BigDecimal fallback) { if (v instanceof Literal) { return getDecimalValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getFloatValue(Literal, float) * getFloatValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static float getFloatValue(Value v, float fallback) { if (v instanceof Literal) { return getFloatValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of {@link #getBooleanValue(Literal, boolean) * getBooleanValue((Literal)value, fallback)} in case the supplied value is a * literal, returns the fallback value otherwise. */ public static boolean getBooleanValue(Value v, boolean fallback) { if (v instanceof Literal) { return getBooleanValue((Literal)v, fallback); } else { return fallback; } }
/** * Returns the result of * {@link #getCalendarValue(Literal, XMLGregorianCalendar) * getCalendarValue((Literal)value, fallback)} in case the supplied value is * a literal, returns the fallback value otherwise. */ public static XMLGregorianCalendar getCalendarValue(Value v, XMLGregorianCalendar fallback) { if (v instanceof Literal) { return getCalendarValue((Literal)v, fallback); } else { return fallback; } }