org.supercsv.ext.localization.CsvMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of super-csv-annotation Show documentation
Show all versions of super-csv-annotation Show documentation
CSVのJavaライブラリであるSuperCSVに、アノテーション機能を追加したライブラリです。
/*
* 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;
}
}