public class MultyDecodeType extends BaseDecodeType
Composite decode type.
CreateThis sample shows how to create compound MultyDecode types that combine SingleDecodeType and MultiDecode types.MultyDecodeType types1 = new MultyDecodeType(DecodeType.QR, DecodeType.DATA_MATRIX); MultyDecodeType types2 = new MultyDecodeType(types1, DecodeType.CODE_128, DecodeType.CODE_39_STANDARD);
Constructor and Description |
---|
MultyDecodeType(BaseDecodeType... barcodeTypes)
Initializes a new instance of the
MultyDecodeType class. |
MultyDecodeType(SingleDecodeType... barcodeTypes)
Initializes a new instance of the
MultyDecodeType class. |
Modifier and Type | Method and Description |
---|---|
void |
add(SingleDecodeType singleType)
Adds one more
SingleDecodeType to the MultyDecodeType. |
boolean |
containsAll(BaseDecodeType... barcodeTypes)
Check if this contains all types from barcode types.
|
boolean |
containsAny(BaseDecodeType... decodeTypes)
Is contain any of types
|
boolean |
equals(MultyDecodeType other)
Returns a value indicating whether this instance is equal to a specified
MultyDecodeType value. |
int |
getGetSingleTypesCount()
Returns a number of single types.
|
java.util.List<SingleDecodeType> |
getSingleTypes()
Represents a list of single types.
|
int |
hashCode()
Returns the hash code for this instance.
|
java.lang.String |
toString()
Overridden method representing MultyDecodeType as a string.
|
static MultyDecodeType |
tryParseMultyDecodeType(java.lang.String parsingType)
Converts the string representation of a MultyDecodeType to its instance.
|
equals, equals, equals, tryParseBaseDecodeType, tryParseSingleDecodeType
public MultyDecodeType(BaseDecodeType... barcodeTypes)
Initializes a new instance of the MultyDecodeType
class.
barcodeTypes
- Array of single decode typespublic MultyDecodeType(SingleDecodeType... barcodeTypes)
Initializes a new instance of the MultyDecodeType
class.
barcodeTypes
- Array of multy and single decode typespublic void add(SingleDecodeType singleType)
Adds one more SingleDecodeType
to the MultyDecodeType.
singleType
- A Single DecodeType to be added to the listpublic boolean containsAll(BaseDecodeType... barcodeTypes)
Check if this contains all types from barcode types.
barcodeTypes
- Input single or multy barcode typespublic java.lang.String toString()
Overridden method representing MultyDecodeType as a string.
toString
in class java.lang.Object
returns when all types are included.
public static MultyDecodeType tryParseMultyDecodeType(java.lang.String parsingType)
Converts the string representation of a MultyDecodeType to its instance. A return value indicates whether the conversion succeeded or failed.
parsingType
- A string in the format as either "AllSupportedTypes" or "EAN8,EAN13,CodaBar" to convert.otherwise it returns indefinite type. or MultyDecodeType ("NONE").
public boolean containsAny(BaseDecodeType... decodeTypes)
Is contain any of types
containsAny
in class BaseDecodeType
decodeTypes
- Decode typespublic java.util.List<SingleDecodeType> getSingleTypes()
Represents a list of single types.
public int getGetSingleTypesCount()
Returns a number of single types.
public boolean equals(MultyDecodeType other)
Returns a value indicating whether this instance is equal to a specified MultyDecodeType
value.
equals
in class BaseDecodeType
other
- An MultyDecodeType
value to compare to this instance.public int hashCode()
Returns the hash code for this instance.
hashCode
in class BaseDecodeType