| | |
| | | /* |
| | | Zeitrechnung - a class library to determine calendar events |
| | | Copyright (c) 1984-2023 Ulrich Hilger, http://uhilger.de |
| | | |
| | | This program is free software: you can redistribute it and/or modify |
| | | it under the terms of the GNU Affero General Public License as published by |
| | | the Free Software Foundation, either version 3 of the License, or |
| | | (at your option) any later version. |
| | | |
| | | This program is distributed in the hope that it will be useful, |
| | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| | | GNU Affero General Public License for more details. |
| | | |
| | | You should have received a copy of the GNU Affero General Public License |
| | | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| | | */ |
| | | package de.uhilger.zeitrechnung; |
| | | |
| | | /** |
| | | * Einfache Klasse fuer ein ChinesischesDatum, die neben |
| | | * Jahr, Monat und Tag auch den Zyklus im chinesischen |
| | | * Kalender abbildet und festhaelt, ob der Monat ein |
| | | * Schaltmonat ist. |
| | | * |
| | | * @author Ulrich Hilger |
| | | */ |
| | |
| | | private long zyklus; |
| | | private boolean schaltmonat; |
| | | |
| | | /** |
| | | * Ein Objekt der Klasse ChinesischesDatum erzeugen |
| | | */ |
| | | public ChinesischesDatum() { |
| | | super(); |
| | | } |
| | | |
| | | /** |
| | | * Ein Objekt der Klasse ChinesischesDatum erzeugen |
| | | * |
| | | * @param zyklus der Zyklus des chinesischen Kalenders |
| | | * @param jahr das Jahr im chinesischen Kalender |
| | | * @param monat der Monat im chinesischen Kalender |
| | | * @param schaltmonat true, wenn der Monat ein Schaltmonat ist, sonst false |
| | | * @param tag Tag im Monat des chinesischen Kalenders |
| | | */ |
| | | public ChinesischesDatum(long zyklus, long jahr, int monat, boolean schaltmonat, int tag) { |
| | | super(jahr, monat, tag); |
| | | this.zyklus = zyklus; |
| | | this.schaltmonat = schaltmonat; |
| | | } |
| | | |
| | | /** |
| | | * Den Zyklus dieses Datums im chinesischen Kalender ermitteln |
| | | * @return Zyklus |
| | | */ |
| | | public long getZyklus() { |
| | | return zyklus; |
| | | } |
| | | |
| | | /** |
| | | * Den Zyklkus im chinesischen Kalender angeben |
| | | * @param zyklus der Zyklus dieses Datums |
| | | */ |
| | | public void setZyklus(long zyklus) { |
| | | this.zyklus = zyklus; |
| | | } |
| | | |
| | | /** |
| | | * Ermitteln, ob der Monat dieses Datums ein Schaltmonat ist |
| | | * @return true, wenn der Monat ein Schaltmonat ist, sonst false |
| | | */ |
| | | public boolean isSchaltmonat() { |
| | | return schaltmonat; |
| | | } |
| | | |
| | | /** |
| | | * Angeben, ob der Monat dieses Datums ein Schaltmonat ist |
| | | * @param schaltmonat true, wenn der Monat ein Schaltmonat ist, sonst false |
| | | */ |
| | | public void setSchaltmonat(boolean schaltmonat) { |
| | | this.schaltmonat = schaltmonat; |
| | | } |