PageRenderTime 21ms CodeModel.GetById 11ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/ItemID/src/com/ideal/itemid/IntentResult.java

http://eyes-free.googlecode.com/
Java | 53 lines | 15 code | 8 blank | 30 comment | 0 complexity | f50bba3f8b852fbdc8925ca1a784b5da MD5 | raw file
 1/*
 2 * Copyright 2009 ZXing authors
 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
17package com.ideal.itemid;
18
19/**
20 * <p>
21 * Encapsulates the result of a barcode scan invoked through
22 * {@link IntentIntegrator}.
23 * </p>
24 * 
25 * @author Sean Owen
26 */
27public final class IntentResult {
28
29    private final String contents;
30
31    private final String formatName;
32
33    IntentResult(String contents, String formatName) {
34        this.contents = contents;
35        this.formatName = formatName;
36    }
37
38    /**
39     * @return raw content of barcode
40     */
41    public String getContents() {
42        return contents;
43    }
44
45    /**
46     * @return name of format, like "QR_CODE", "UPC_A". See
47     *         <code>BarcodeFormat</code> for more format names.
48     */
49    public String getFormatName() {
50        return formatName;
51    }
52
53}