net.time4j.engine.AttributeKey Maven / Gradle / Ivy
/*
* -----------------------------------------------------------------------
* Copyright © 2013-2014 Meno Hochschild,
* -----------------------------------------------------------------------
* This file (AttributeKey.java) is part of project Time4J.
*
* Time4J is free software: You can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* Time4J 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Time4J. If not, see .
* -----------------------------------------------------------------------
*/
package net.time4j.engine;
/**
* Defines a key for a format attribute as type-safe accessor.
*
* Attributes are constrained to types which are immutable and
* serializable. If there are predefined attributes then the associated
* keys are to be used via the corresponding constants in the class
* {@link net.time4j.format.Attributes} instead of creating new ones.
*
* @param generic immutable type of attribute value
* @author Meno Hochschild
* @see AttributeQuery
*/
/*[deutsch]
* Definiert einen Attributschlüssel zum typsicheren Zugriff auf ein
* Formatattribut.
*
* Attribute sind auf Typen beschränkt, die immutable und
* serialisierbar sind. Gibt es vordefinierte Attribute, so sind deren
* Schlüssel über die entsprechenden Konstanten in der Klasse
* {@link net.time4j.format.Attributes} zu verwenden, nicht neue zu
* erzeugen.
*
* @param generic immutable type of attribute value
* @author Meno Hochschild
* @see AttributeQuery
*/
public interface AttributeKey {
//~ Methoden ----------------------------------------------------------
/**
* Name of associated format attribute.
*
* @return String
*/
/*[deutsch]
* Name des assoziierten Formatattributs.
*
* @return String
*/
String name();
/**
* Type of associated format attribute.
*
* @return Class
*/
/**
* Typ des assoziierten Formatattributs.
*
* @return Class
*/
Class type();
}