Class UncheckedText

  • All Implemented Interfaces:
    Text

    public final class UncheckedText
    extends Object
    implements Text
    Text that doesn't throw checked Exception.

    There is no thread-safety guarantee.

    Since:
    0.3
    • Constructor Detail

      • UncheckedText

        public UncheckedText​(CharSequence txt)
        Ctor.
        Parameters:
        txt - Encapsulated text
        Since:
        0.9
      • UncheckedText

        public UncheckedText​(Text txt)
        Ctor.
        Parameters:
        txt - Encapsulated text
      • UncheckedText

        public UncheckedText​(Text txt,
                             Func<Exception,​String> fbk)
        Ctor.
        Parameters:
        txt - Encapsulated text
        fbk - Fallback func if Exception happens
        Since:
        0.5
    • Method Detail

      • asString

        public String asString()
        Description copied from interface: Text
        Convert it to the string.
        Specified by:
        asString in interface Text
        Returns:
        The string
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object