mirror of https://github.com/apache/poi.git
bug 50955 convert Set to Singleton per Javen's code review
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1790215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
55ed734108
commit
e4c2fa0fe0
|
@ -19,7 +19,7 @@ package org.apache.poi.util;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.HashSet;
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,13 +31,7 @@ import java.util.Set;
|
||||||
public class CodePageUtil
|
public class CodePageUtil
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final Set<Charset> DOUBLE_BYTE_CHARSETS
|
public static final Set<Charset> DOUBLE_BYTE_CHARSETS = Collections.singleton(StringUtil.BIG5);
|
||||||
= new HashSet<Charset>();
|
|
||||||
|
|
||||||
static {
|
|
||||||
DOUBLE_BYTE_CHARSETS.add(StringUtil.BIG5);
|
|
||||||
//others?
|
|
||||||
}
|
|
||||||
|
|
||||||
/** <p>Codepage 037, a special case</p> */
|
/** <p>Codepage 037, a special case</p> */
|
||||||
public static final int CP_037 = 37;
|
public static final int CP_037 = 37;
|
||||||
|
|
|
@ -102,14 +102,6 @@ public class OldTextPiece extends TextPiece {
|
||||||
return 42; // any arbitrary constant will do
|
return 42; // any arbitrary constant will do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the character position we start at.
|
|
||||||
*/
|
|
||||||
public int getCP() {
|
|
||||||
return getStart();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "OldTextPiece from " + getStart() + " to " + getEnd() + " ("
|
return "OldTextPiece from " + getStart() + " to " + getEnd() + " ("
|
||||||
+ getPieceDescriptor() + ")";
|
+ getPieceDescriptor() + ")";
|
||||||
|
|
Loading…
Reference in New Issue