001/* 002 * ============================================================================ 003 * Copyright © 2002-2023 by Thomas Thrien. 004 * All Rights Reserved. 005 * ============================================================================ 006 * Licensed to the public under the agreements of the GNU Lesser General Public 007 * License, version 3.0 (the "License"). You may obtain a copy of the License at 008 * 009 * http://www.gnu.org/licenses/lgpl.html 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 013 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 014 * License for the specific language governing permissions and limitations 015 * under the License. 016 */ 017 018package org.tquadrat.foundation.util.stringconverter; 019 020import static org.apiguardian.api.API.Status.STABLE; 021 022import java.io.Serial; 023import java.time.DayOfWeek; 024import java.time.Month; 025 026import org.apiguardian.api.API; 027import org.tquadrat.foundation.annotation.ClassVersion; 028 029/** 030 * An implementation of 031 * {@link EnumStringConverter} 032 * for 033 * {@link Month} 034 * values. 035 * 036 * @extauthor Thomas Thrien - thomas.thrien@tquadrat.org 037 * @version $Id: DayOfWeekStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $ 038 * @since 0.0.6 039 * 040 * @UMLGraph.link 041 */ 042@ClassVersion( sourceVersion = "$Id: DayOfWeekStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $" ) 043@API( status = STABLE, since = "0.0.6" ) 044public final class DayOfWeekStringConverter extends EnumStringConverter<DayOfWeek> 045{ 046 /*------------------------*\ 047 ====** Static Initialisations **=========================================== 048 \*------------------------*/ 049 /** 050 * The serial version UID for objects of this class: {@value}. 051 * 052 * @hidden 053 */ 054 @Serial 055 private static final long serialVersionUID = 1L; 056 057 /** 058 * An instance of this class. 059 */ 060 public static final DayOfWeekStringConverter INSTANCE = new DayOfWeekStringConverter(); 061 062 /*--------------*\ 063 ====** Constructors **===================================================== 064 \*--------------*/ 065 /** 066 * Creates a new {@code MonthStringConverter} instance. 067 */ 068 public DayOfWeekStringConverter() { super( DayOfWeek.class ); } 069 070 /*---------*\ 071 ====** Methods **========================================================== 072 \*---------*/ 073 /** 074 * This method is used by the 075 * {@link java.util.ServiceLoader} 076 * to obtain the instance for this 077 * {@link org.tquadrat.foundation.lang.StringConverter} 078 * implementation. 079 * 080 * @return The instance for this {@code StringConverter} implementation. 081 */ 082 public static final DayOfWeekStringConverter provider() { return INSTANCE; } 083} 084// class DayOfWeekStringConverter 085 086/* 087 * End of File 088 */