All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jfxtras.icalendarfx.properties.PropBaseLanguage Maven / Gradle / Ivy

There is a newer version: 17-r1
Show newest version
package jfxtras.icalendarfx.properties;

import jfxtras.icalendarfx.parameters.Language;
import jfxtras.icalendarfx.properties.component.descriptive.Categories;
import jfxtras.icalendarfx.properties.component.timezone.TimeZoneName;

/**
 * Property with language and a text-based value
 *  
 * concrete subclasses
 * @see Categories
 * @see TimeZoneName
 * 
 * @author David Bal
 *
 * @param  - type of implementing subclass
 * @param  - type of property value
 */
public abstract class PropBaseLanguage extends VPropertyBase implements PropLanguage
{
    /**
     * LANGUAGE
     * To specify the language for text values in a property or property parameter.
     * 
     * Examples:
     * SUMMARY;LANGUAGE=en-US:Company Holiday Party
     * LOCATION;LANGUAGE=no:Tyskland
     */
    @Override
    public Language getLanguage() { return language; }
    private Language language;
    @Override
    public void setLanguage(Language language)
    {
    	orderChild(this.language, language);
    	this.language = language;
	}
    public void setLanguage(String value)
    {
    	setLanguage(Language.parse(value));
	}
    public U withLanguage(Language language)
    {
    	setLanguage(language);
    	return (U) this;
	}
    public U withLanguage(String content)
    {
    	setLanguage(content);
    	return (U) this;
	}    
    
    /*
     * CONSTRUCTORS
     */    
   
    // copy constructor
    public PropBaseLanguage(PropBaseLanguage property)
    {
        super(property);
    }
    
    public PropBaseLanguage(T value)
    {
        super(value);
    }
    
    protected PropBaseLanguage()
    {
        super();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy