/** * <p>Gets the corresponding numerical value. </p> * * @return int (Q1 = 1, Q2 = 2, Q3 = 3, Q4 = 4) */ /*[deutsch] * <p>Liefert den korrespondierenden chronologischen Integer-Wert. </p> * * @return int (Q1 = 1, Q2 = 2, Q3 = 3, Q4 = 4) */ public int getValue() { return (this.ordinal() + 1); }
/** * <p>Rolls by given amount of quarters. </p> * * @param quarters count of quarters (maybe negative) * @return result of rolling operation */ /*[deutsch] * <p>Rollt um die angegebene Anzahl von Quartalen vor oder * zurück. </p> * * @param quarters count of quarters (maybe negative) * @return result of rolling operation */ public Quarter roll(int quarters) { return Quarter.valueOf( (this.ordinal() + (quarters % 4 + 4)) % 4 + 1); }