Class BaseDecodeType

  • All Implemented Interfaces:
    android.os.Parcelable
    Direct Known Subclasses:
    MultyDecodeType, SingleDecodeType

    public abstract class BaseDecodeType
    extends java.lang.Object
    implements android.os.Parcelable

    Base class for MultyDecodeType and SingleDecodeType.


     This sample shows how to use BaseDecodeType with SingleDecodeType and MultyDecodeType
     
     BaseDecodeType decodeOne = DecodeType.CODE_128;
     BaseDecodeType decodeTwo = new MultyDecodeType(DecodeType.CODE_128, DecodeType.CODE_39_STANDARD, DecodeType.CODE_39_EXTENDED);
     

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      • Fields inherited from interface android.os.Parcelable

        CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean containsAny​(BaseDecodeType... types)
      Determines whether any of the given decode types is included into
      boolean equals​(java.lang.Object obj)
      Returns a value indicating whether this instance is equal to a specified BaseDecodeType value.
      int hashCode()
      Returns the hash code for this instance.
      static BaseDecodeType tryParseBaseDecodeType​(java.lang.String parsingType)
      Converts the string representation of a BaseDecodeType to its instance, having determined the concrete type.
      static MultyDecodeType tryParseMultyDecodeType​(java.lang.String parsingType)
      Converts the string representation of a MultyDecodeType to its instance.
      static SingleDecodeType tryParseSingleDecodeType​(java.lang.String parsingType)
      Converts the string representation of a SingleDecodeType to its instance.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface android.os.Parcelable

        describeContents, writeToParcel
    • Method Detail

      • containsAny

        public abstract boolean containsAny​(BaseDecodeType... types)

        Determines whether any of the given decode types is included into

        Parameters:
        types - Types to verify.
        Returns:
        Value is a true if any types are included into.
      • equals

        public boolean equals​(java.lang.Object obj)

        Returns a value indicating whether this instance is equal to a specified BaseDecodeType value.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - An System.Object value to compare to this instance.
        Returns:
        True if obj has the same value as this instance; otherwise, false.
      • hashCode

        public int hashCode()

        Returns the hash code for this instance.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A 32-bit signed integer hash code.
      • tryParseSingleDecodeType

        public static SingleDecodeType tryParseSingleDecodeType​(java.lang.String parsingType)

        Converts the string representation of a SingleDecodeType to its instance. A return value indicates whether the conversion succeeded or failed.

        Parameters:
        parsingType - A string containing a SingleDecodeType representation to convert.
        Returns:
        An actual SingleDecodeType is returned, when conversion has completed successfully;

        otherwise it returns indefinite type. or SingleDecodeType (-1, "None").

      • tryParseMultyDecodeType

        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.

        Parameters:
        parsingType - A string containing a MultyDecodeType representation to convert.
        Returns:
        An actual MultyDecodeType is returned, when conversion has completed successfully;

        otherwise it returns indefinite type. or MultyDecodeType ("None").

      • tryParseBaseDecodeType

        public static BaseDecodeType tryParseBaseDecodeType​(java.lang.String parsingType)

        Converts the string representation of a BaseDecodeType to its instance, having determined the concrete type. A return value indicates whether the conversion succeeded or failed.

        Parameters:
        parsingType - A string containing a MultyDecodeType representation to convert.
        Returns:
        An actual MultyDecodeType is returned, when conversion has completed successfully;

        otherwise it returns indefinite type. or MultyDecodeType ("None").