Debian Codegraph @

src/tools/org/h2/build/indexer/Weight.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.build.indexer;
7
8 /**
9 * Represents a weight of a token in a page.
10 */
11 public class Weight {
12
13 /**
14 * The weight of a word in a title.
15 */
16 static final int TITLE = 10000;
17
18 /**
19 * The weight of a word in the header.
20 */
21 static final int HEADER = 100;
22
23 /**
24 * The weight of a word in a paragraph.
25 */
26 static final int PARAGRAPH = 1;
27
28 /**
29 * The page referenced.
30 */
31 Page page;
32
33 /**
34 * The weight value.
35 */
36 int value;
37
38 @Override
39 public String toString() {
40 return "" + value;
41 }
42
43 }