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

org.supercsv.ext.localization.CsvMessage Maven / Gradle / Ivy

Go to download

CSVのJavaライブラリであるSuperCSVに、アノテーション機能を追加したライブラリです。

There is a newer version: 2.3
Show newest version
/*
 * CsvMessage.java
 * created in 2013/03/09
 *
 * (C) Copyright 2003-2013 GreenDay Project. All rights reserved.
 */
package org.supercsv.ext.localization;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;


/**
 *
 *
 * @author T.TSUCHIE
 *
 */
public class CsvMessage implements Serializable {

    /** serialVersionUID */
    private static final long serialVersionUID = 1L;
    
    private final String code;
    
    private final Map variables = new HashMap();
    
    public CsvMessage(final String code) {
        this.code = code;
    }
    
    public CsvMessage(final String code, final Map vars) {
        this.code = code;
        variables.putAll(vars);
    }
    
    public CsvMessage add(final String varName, final Object varValue) {
        variables.put(varName, varValue);
        return this;
    }
    
    public CsvMessage addAll(final Map vars) {
        variables.putAll(vars);
        return this;
    }
    
    public String getCode() {
        return code;
    }
    
    public Map getVariables() {
        return variables;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy