1 // Copyright 2011 Google Inc. All Rights Reserved.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 package com.hughes.android.dictionary;
17 import java.io.Serializable;
19 public class DictionaryInfo implements Serializable {
21 private static final long serialVersionUID = -6850863377577700388L;
23 // Stuff populated from the text file.
24 public final String[] langIsos = new String[2];
25 public String uncompressedFilename;
26 public long uncompressedSize;
27 public final int[] allTokenCounts = new int[2];
28 public final int[] mainTokenCounts = new int[2];
30 String name; // Determined at runtime based on locale on device--user editable.
31 String localFile; // Determined based on device's Environment.
35 public String toString() {
39 public String toTabSeparatedString() {
40 return String.format("%s\t%s\t%s\t%d\t%d\t%d\t%d\t%d", langIsos[0],
41 langIsos[1], uncompressedFilename, uncompressedSize,
42 mainTokenCounts[0], mainTokenCounts[1], allTokenCounts[0],