• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.inputmethod.latin.makedict;
18 
19 import java.util.ArrayList;
20 
21 /**
22  * Raw PtNode info straight out of a file. This will contain numbers for addresses.
23  */
24 public final class PtNodeInfo {
25     public final int mOriginalAddress;
26     public final int mEndAddress;
27     public final int mFlags;
28     public final int[] mCharacters;
29     public final ProbabilityInfo mProbabilityInfo;
30     public final int mChildrenAddress;
31     public final ArrayList<WeightedString> mShortcutTargets;
32     public final ArrayList<PendingAttribute> mBigrams;
33 
PtNodeInfo(final int originalAddress, final int endAddress, final int flags, final int[] characters, final ProbabilityInfo probabilityInfo, final int childrenAddress, final ArrayList<WeightedString> shortcutTargets, final ArrayList<PendingAttribute> bigrams)34     public PtNodeInfo(final int originalAddress, final int endAddress, final int flags,
35             final int[] characters, final ProbabilityInfo probabilityInfo,
36             final int childrenAddress, final ArrayList<WeightedString> shortcutTargets,
37             final ArrayList<PendingAttribute> bigrams) {
38         mOriginalAddress = originalAddress;
39         mEndAddress = endAddress;
40         mFlags = flags;
41         mCharacters = characters;
42         mProbabilityInfo = probabilityInfo;
43         mChildrenAddress = childrenAddress;
44         mShortcutTargets = shortcutTargets;
45         mBigrams = bigrams;
46     }
47 
isTerminal()48     public boolean isTerminal() {
49         return mProbabilityInfo != null;
50     }
51 }
52