Class PolyString

    • Field Detail

      • F_ORIG

        public static final ItemName F_ORIG
      • F_NORM

        public static final ItemName F_NORM
      • F_TRANSLATION

        public static final ItemName F_TRANSLATION
      • F_TRANSLATION_LOCAL_PART

        public static final String F_TRANSLATION_LOCAL_PART
      • F_LANG

        public static final ItemName F_LANG
      • F_LANG_LOCAL_PART

        public static final String F_LANG_LOCAL_PART
    • Method Detail

      • getOrig

        public String getOrig()
      • setComputedOrig

        public void setComputedOrig​(String computedOrig)
        Used to set computed values of orig, e.g. in cases of translation. Not very clean.
      • getNorm

        public String getNorm()
      • setTranslation

        @Experimental
        public void setTranslation​(PolyStringTranslationType translation)
        Do NOT rely on this method too much. It may disappear later, e.g. when we align PolyString and PolyString type and make PolyString really immutable.
      • setLang

        @Experimental
        public void setLang​(Map<String,​String> lang)
        Do NOT rely on this method too much. It may disappear later, e.g. when we align PolyString and PolyString type and make PolyString really immutable.
      • isEmpty

        public boolean isEmpty()
      • isNull

        public boolean isNull()
      • isComputed

        public boolean isComputed()
      • length

        public int length()
      • substring

        public String substring​(int from,
                                int to)
      • startsWith

        public boolean startsWith​(String value)
        Helper function that checks whether this original string begins with the specified value.
        Parameters:
        value - the value
        Returns:
        the string
      • endsWith

        public boolean endsWith​(String value)
        Helper function that checks whether this original string ends with the specified value.
        Parameters:
        value - the value
        Returns:
        the string
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • shortDump

        public void shortDump​(StringBuilder sb)
        Description copied from interface: ShortDumpable
        Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.
        Specified by:
        shortDump in interface ShortDumpable
        Parameters:
        sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
      • isSimple

        public boolean isSimple()
        Returns true if the PolyString form contains only simple string. I.e. returns true if the polystring can be serialized in a simplified form of a single string. Returns true in case that there are language mutations, translation, etc.