public static String format(final Number target, final Integer minIntegerDigits, final Integer decimalDigits, final Locale locale) { if (target == null) { return null; } Validate.notNull(minIntegerDigits, "Minimum integer digits cannot be null"); Validate.notNull(decimalDigits, "Decimal digits cannot be null"); return formatNumber(target, minIntegerDigits, NumberPointType.NONE, decimalDigits, NumberPointType.DEFAULT, locale); }
public static String format(final Object target, final String pattern, final Locale locale) { Validate.notEmpty(pattern, "Pattern cannot be null or empty"); if (target == null) { return null; } return formatDate(target, pattern, locale); }
public StandardDOMEventAttributeTagProcessor(final String dialectPrefix, final String attrName) { super(TemplateMode.HTML, dialectPrefix, null, false, attrName, true, PRECEDENCE, false); Validate.notNull(attrName, "Complete name of target attribute cannot be null"); this.targetAttrCompleteName = attrName; }
public String arrayJoin(final Object[] stringArray, final String separator) { if (stringArray == null) { return null; } return StringUtils.join(stringArray, separator); }
public Integer dayOfWeek(final Calendar target) { if (target == null) { return null; } return DateUtils.dayOfWeek(target); }
public String substringBefore(final Object target, final String substr) { if (target == null) { return null; } return StringUtils.substringBefore(target, substr); }
/** * * @return the result * @since 1.1.2 */ public static Calendar createToday() { return createToday(null, null); }
public String monthNameShort(final Date target) { if (target == null) { return null; } return DateUtils.monthNameShort(target, this.locale); }
public Integer second(final Date target) { if (target == null) { return null; } return DateUtils.second(target); }
private String getText() { if (this.resolvedText == null) { this.resolvedText = resolveText(); } return this.resolvedText; }
/** * * @param expression expression * @param convertToString convertToString * @since 2.1.0 */ public SelectionVariableExpression(final String expression, final boolean convertToString) { super(); Validate.notNull(expression, "Expression cannot be null"); this.expression = expression; this.convertToString = convertToString; }
public static String format(final Number target, final Integer minIntegerDigits, final Integer decimalDigits, final NumberPointType decimalPointType, final Locale locale) { if (target == null) { return null; } Validate.notNull(minIntegerDigits, "Minimum integer digits cannot be null"); Validate.notNull(decimalDigits, "Decimal digits cannot be null"); Validate.notNull(decimalPointType, "Decimal point type cannot be null"); return formatNumber(target, minIntegerDigits, NumberPointType.NONE, decimalDigits, decimalPointType, locale); }
public Integer dayOfWeek(final Date target) { if (target == null) { return null; } return DateUtils.dayOfWeek(target); }
/** * <p> * Sets the locale to be used. * </p> * * @param locale the locale. */ public void setLocale(final Locale locale) { Validate.notNull(locale, "Locale cannot be null"); this.locale = locale; }
public static String format(final Number target, final Integer minIntegerDigits, final NumberPointType thousandsPointType, final Integer decimalDigits, final NumberPointType decimalPointType, final Locale locale) { if (target == null) { return null; } Validate.notNull(minIntegerDigits, "Minimum integer digits cannot be null"); Validate.notNull(thousandsPointType, "Thousands point type cannot be null"); Validate.notNull(decimalDigits, "Decimal digits cannot be null"); Validate.notNull(decimalPointType, "Decimal point type cannot be null"); return formatNumber(target, minIntegerDigits, thousandsPointType, decimalDigits, decimalPointType, locale); }
protected AbstractExpressionContext(final IEngineConfiguration configuration, final Locale locale) { super(locale); Validate.notNull(configuration, "Configuration cannot be null"); this.configuration = configuration; }
public static String format(final Number target, final Integer minIntegerDigits, final NumberPointType thousandsPointType, final Integer decimalDigits, final Locale locale) { if (target == null) { return null; } Validate.notNull(minIntegerDigits, "Minimum integer digits cannot be null"); Validate.notNull(thousandsPointType, "Thousands point type cannot be null"); Validate.notNull(decimalDigits, "Decimal digits cannot be null"); return formatNumber(target, minIntegerDigits, thousandsPointType, decimalDigits, NumberPointType.DEFAULT, locale); }
public MinusExpression(final Expression operand) { super(); Validate.notNull(operand, "Operand cannot be null"); this.operand = operand; }
public DialectConfiguration(final IDialect dialect) { super(); // Prefix CAN be null Validate.notNull(dialect, "Dialect cannot be null"); this.prefixSpecified = false; this.prefix = null; this.dialect = dialect; }
public static void containsNoNulls(final Object[] array, final String message) { for (final Object object : array) { notNull(object, message); } }