001/* 002 * ============================================================================ 003 * Copyright © 2002-2026 by Thomas Thrien. 004 * All Rights Reserved. 005 * ============================================================================ 006 * 007 * Licensed to the public under the agreements of the GNU Lesser General Public 008 * License, version 3.0 (the "License"). You may obtain a copy of the License at 009 * 010 * http://www.gnu.org/licenses/lgpl.html 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 015 * License for the specific language governing permissions and limitations 016 * under the License. 017 */ 018 019package org.tquadrat.foundation.function; 020 021import static org.apiguardian.api.API.Status.STABLE; 022 023import org.apiguardian.api.API; 024import org.tquadrat.foundation.annotation.ClassVersion; 025 026/** 027 * <p>{@summary The definition for a setter method.}</p> 028 * <p>This is a 029 * {@linkplain java.lang.FunctionalInterface functional interface} 030 * whose functional method is 031 * {@link #set(Object)}.</p> 032 * <p>This interface does <i>not</i> extend the otherwise very similar 033 * interface 034 * {@link java.util.function.Consumer}.</p> 035 * 036 * @author Thomas Thrien - thomas.thrien@tquadrat.org 037 * @version $Id: Setter.java 1295 2026-10-18 12:34:27Z tquadrat $ 038 * @since 0.0.5 039 * 040 * @param <T> The value type. 041 * 042 * @UMLGraph.link 043 */ 044@SuppressWarnings( "NewClassNamingConvention" ) 045@FunctionalInterface 046@ClassVersion( sourceVersion = "$Id: Setter.java 1295 2026-10-18 12:34:27Z tquadrat $" ) 047@API( status = STABLE, since = "0.0.5" ) 048public interface Setter<T> 049{ 050 /*---------*\ 051 ====** Methods **========================================================== 052 \*---------*/ 053 /** 054 * <p>{@summary Takes the given argument and stores it somewhere.}</p> 055 * 056 * @param value The value to store. 057 */ 058 public void set( final T value ); 059} 060// interface Setter 061 062/* 063 * End of File 064 */