com.google.zxing.qrcode.decoder
Class ErrorCorrectionLevel

java.lang.Object
  extended by com.google.zxing.qrcode.decoder.ErrorCorrectionLevel

public final class ErrorCorrectionLevel
extends Object

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels defined by the QR code standard.

Since:
BlackBerry API 6.0.0

Field Summary
static ErrorCorrectionLevel H
          H = ~30% correction
static ErrorCorrectionLevel L
          L = ~7% correction
static ErrorCorrectionLevel M
          M = ~15% correction
static ErrorCorrectionLevel Q
          Q = ~25% correction
 
Method Summary
static ErrorCorrectionLevel forBits(int bits)
           
 int getBits()
           
 String getName()
           
 int ordinal()
           
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Field Detail

L

public static final ErrorCorrectionLevel L
L = ~7% correction

Since:
BlackBerry API 6.0.0

M

public static final ErrorCorrectionLevel M
M = ~15% correction

Since:
BlackBerry API 6.0.0

Q

public static final ErrorCorrectionLevel Q
Q = ~25% correction

Since:
BlackBerry API 6.0.0

H

public static final ErrorCorrectionLevel H
H = ~30% correction

Since:
BlackBerry API 6.0.0


Method Detail

ordinal

public int ordinal()
Since:
BlackBerry API 6.0.0

getBits

public int getBits()
Since:
BlackBerry API 6.0.0

getName

public String getName()
Since:
BlackBerry API 6.0.0

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.
Since:
BlackBerry API 6.0.0

forBits

public static ErrorCorrectionLevel forBits(int bits)
Parameters:
bits - int containing the two bits encoding a QR Code's error correction level
Returns:
ErrorCorrectionLevel representing the encoded error correction level
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.