* @param locale Locale
* <p>
* @return Whether price ({@code value}) is at least {@code filter}
- *
+ * <p>
* @see https://www.primefaces.org/showcase/ui/data/datatable/filter.xhtml
*/
@SuppressWarnings ("unchecked")
}
// Do the cast and compare
- return ((Comparable<BigDecimal>) value).compareTo(BigDecimal.valueOf(Double.valueOf(filterText))) >= 0;
+ return ((Comparable<BigDecimal>) value).compareTo(BigDecimal.valueOf(Double.parseDouble(filterText))) >= 0;
}
/**
}
// Get context parameter
- final Integer contextValue = Integer.parseInt(this.getStringContextParameter(parameterKey));
+ final Integer contextValue = Integer.valueOf(this.getStringContextParameter(parameterKey));
// Return it
return contextValue;
final String contextParameter = this.getStringContextParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N
// Return it
- return (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
+ return Boolean.parseBoolean(contextParameter);
}
/**
* @author Roland Häder<roland@mxchange.org>
*/
public enum DayOfTheWeek {
+ /**
+ * Enumeration for Sunday
+ */
SUNDAY {
@Override
public int toCalendar () {
}
},
+ /**
+ * Enumeration for Monday
+ */
MONDAY {
@Override
public int toCalendar () {
return Calendar.MONDAY;
}
},
+ /**
+ * Enumeration for Tuesay
+ */
TUESDAY {
@Override
public int toCalendar () {
return Calendar.TUESDAY;
}
},
+ /**
+ * Enumeration for Wednesday
+ */
WEDNESDAY {
@Override
public int toCalendar () {
return Calendar.WEDNESDAY;
}
},
+ /**
+ * Enumeration for Thursday
+ */
THURSDAY {
@Override
public int toCalendar () {
return Calendar.THURSDAY;
}
},
+ /**
+ * Enumeration for Friday
+ */
FRIDAY {
@Override
public int toCalendar () {
return Calendar.FRIDAY;
}
},
+ /**
+ * Enumeration for Saturday
+ */
SATURDAY {
@Override
public int toCalendar () {
SIMPLE_DATE_FORMAT.applyPattern("EEEEEEEEEE"); //NOI18N
}
+ /**
+ * Returns index from enumeration
+ * <p>
+ * @return Index of enumeration
+ */
public abstract int toCalendar ();
/**
DayOfTheWeek dayOfTheWeek = null;
// Walk through all values
- for (final DayOfTheWeek dayOfWeek : DayOfTheWeek.values()) {
+ for (final DayOfTheWeek currentDayOfTheWeek : DayOfTheWeek.values()) {
// Has the day being found?
- if (dayOfWeek.toCalendar() == day) {
+ if (currentDayOfTheWeek.toCalendar() == day) {
// Found it and break out from lopp
- dayOfTheWeek = dayOfWeek;
+ dayOfTheWeek = currentDayOfTheWeek;
break;
}
}
return fromCalendarDay(calendar.get(Calendar.DAY_OF_WEEK));
}
- /*
- * Should return the localized day of the week
- */
@Override
public String toString () {
// Init calendar