code: @Deprecated
      @Override
      protected int writeValueAndType(boolean hasValue, int value, int node) {
          if(!hasValue) {
              return write(node);
          }
          int length;
          if(value<0 || value>CharsTrie.kMaxTwoUnitNodeValue) {
              intUnits[0]=(char)(CharsTrie.kThreeUnitNodeValueLead);
              intUnits[1]=(char)(value>>16);
              intUnits[2]=(char)value;
              length=3;
          } else if(value<=CharsTrie.kMaxOneUnitNodeValue) {
              intUnits[0]=(char)((value+1)<<6);
              length=1;
          } else {
              intUnits[0]=(char)(CharsTrie.kMinTwoUnitNodeValueLead+((value>>10)&0x7fc0));
              intUnits[1]=(char)value;
              length=2;
          }
          intUnits[0]|=(char)node;
          return write(intUnits, length);
      }
docs: {@inheritDoc}
  @deprecated This API is ICU internal only.
  @hide draft / provisional / internal are hidden on Android