Class LongNameHandler.DerivedComponents

  • Enclosing class:
    LongNameHandler

    private static class LongNameHandler.DerivedComponents
    extends java.lang.Object
    Loads and applies deriveComponent rules from CLDR's grammaticalFeatures.xml.

    Consider a deriveComponent rule that looks like this:

       <deriveComponent feature="case" structure="per" value0="compound" value1="nominative"/>
     
    Instantiating an instance as follows:
       DerivedComponents d(loc, "case", "per");
     

    Applying the rule in the XML element above, d.value0("foo") will be "foo", and d.value1("foo") will be "nominative".

    In case of any kind of failure, value0() and value1() will simply return "".

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String value0  
      private java.lang.String value1  
    • Constructor Summary

      Constructors 
      Constructor Description
      DerivedComponents​(ULocale locale, java.lang.String feature, java.lang.String structure)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String value0​(java.lang.String compoundValue)  
      (package private) java.lang.String value1​(java.lang.String compoundValue)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value0

        private java.lang.String value0
      • value1

        private java.lang.String value1
    • Constructor Detail

      • DerivedComponents

        DerivedComponents​(ULocale locale,
                          java.lang.String feature,
                          java.lang.String structure)
        Constructor.
    • Method Detail

      • value0

        java.lang.String value0​(java.lang.String compoundValue)
      • value1

        java.lang.String value1​(java.lang.String compoundValue)