Skip to content

Commit

Permalink
Adding: This is the last component, return directly without if
Browse files Browse the repository at this point in the history
  • Loading branch information
ptorres-prowide committed Sep 13, 2024
1 parent d52932b commit 02b340f
Show file tree
Hide file tree
Showing 292 changed files with 1,274 additions and 1,752 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,9 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
if (component == 3) {
//default format (as is)
return getComponent(3);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(3);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
if (component == 3) {
//default format (as is)
return getComponent(3);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(3);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
if (component == 3) {
//default format (as is)
return getComponent(3);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(3);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
if (component == 3) {
//default format (as is)
return getComponent(3);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(3);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
if (component == 3) {
//default format (as is)
return getComponent(3);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(3);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(3);
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,13 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(2);
}
if (component == 3) {
//amount, rate
java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale));
f.setMaximumFractionDigits(13);
BigDecimal n = getComponent3AsBigDecimal();
if (n != null) {
return f.format(n);
}
// This is the last component, return directly without `if`
//amount, rate
java.text.NumberFormat f = java.text.NumberFormat.getNumberInstance(notNull(locale));
f.setMaximumFractionDigits(13);
BigDecimal n = getComponent3AsBigDecimal();
if (n != null) {
return f.format(n);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,9 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
if (component == 4) {
//default format (as is)
return getComponent(4);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(4);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,9 @@ public String getValueDisplay(int component, Locale locale) {
//default format (as is)
return getComponent(1);
}
if (component == 2) {
//default format (as is)
return getComponent(2);
}
return null;
// This is the last component, return directly without `if`
//default format (as is)
return getComponent(2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,12 @@ public String getValueDisplay(int component, Locale locale) {
return f.format(cal.getTime());
}
}
if (component == 2) {
//month and day: MMDD
java.text.DateFormat f = new java.text.SimpleDateFormat("MMM dd", notNull(locale));
java.util.Calendar cal = getComponent2AsCalendar();
if (cal != null) {
return f.format(cal.getTime());
}
// This is the last component, return directly without `if`
//month and day: MMDD
java.text.DateFormat f = new java.text.SimpleDateFormat("MMM dd", notNull(locale));
java.util.Calendar cal = getComponent2AsCalendar();
if (cal != null) {
return f.format(cal.getTime());
}
return null;
}
Expand Down
Loading

0 comments on commit 02b340f

Please sign in to comment.