⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localizedtext.java

📁 webwork in action 下载。
💻 JAVA
字号:
/* * Copyright (c) 2004 Manning Publications. All Rights Reserved. */package org.hibernate.auction.model;import org.hibernate.auction.localization.LocaleUtil;import java.io.Serializable;import java.util.Locale;/** * LocalizedText * * @author Jason Carreira <jason@zenfrog.com> */public class LocalizedText implements Serializable, Comparable {    private Long id;    private String key;    private Locale locale;    private String text;    public Long getId() {        return id;    }    public void setId(Long id) {        this.id = id;    }    public String getKey() {        return key;    }    public void setKey(String key) {        this.key = key;    }    public String getLocaleStr() {        return (locale != null)? locale.toString() : null;    }    public void setLocaleStr(String localeStr) {        this.locale = LocaleUtil.localeFromString(localeStr);    }    public Locale getLocale() {        return locale;    }    public String getText() {        return text;    }    public void setText(String text) {        this.text = text;    }    public boolean equals(Object o) {        if (this == o) return true;        if (!(o instanceof LocalizedText)) return false;        final LocalizedText localizedText = (LocalizedText) o;        if (key != null ? !key.equals(localizedText.key) : localizedText.key != null) return false;        if (locale != null ? !locale.equals(localizedText.locale) : localizedText.locale != null) return false;        return true;    }    public int hashCode() {        int result;        result = (key != null ? key.hashCode() : 0);        result = 29 * result + (locale != null ? locale.hashCode() : 0);        return result;    }    public int compareTo(Object o) {        final LocalizedText other = ((LocalizedText)o);        int retVal = key.compareTo(other.key);        if (retVal == 0) {            retVal = locale.toString().compareTo(other.locale.toString());        }        return retVal;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -