/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. package com.ideal.itemid;
  17. /**
  18. * <p>
  19. * Encapsulates the result of a barcode scan invoked through
  20. * {@link IntentIntegrator}.
  21. * </p>
  22. *
  23. * @author Sean Owen
  24. */
  25. public final class IntentResult {
  26. private final String contents;
  27. private final String formatName;
  28. IntentResult(String contents, String formatName) {
  29. this.contents = contents;
  30. this.formatName = formatName;
  31. }
  32. /**
  33. * @return raw content of barcode
  34. */
  35. public String getContents() {
  36. return contents;
  37. }
  38. /**
  39. * @return name of format, like "QR_CODE", "UPC_A". See
  40. * <code>BarcodeFormat</code> for more format names.
  41. */
  42. public String getFormatName() {
  43. return formatName;
  44. }
  45. }