Accepts values with or without a prefix (e.g. <code>gt2011-01-01</code> and <code>2011-01-01</code>).
If no prefix is provided in the given value, the {@link #getPrefix() existing prefix} is preserved
178240
public void setValueAsString(String theDate) {
		if (isNotBlank(theDate)) {
			ParamPrefixEnum existingPrefix = getPrefix();
			myValue.setValueAsString(super.extractPrefixAndReturnRest(theDate));
			if (getPrefix() == null) {
				setPrefix(existingPrefix);
			}
		} else {
			myValue.setValue(null);
		}
	}
376956
@Override
	public String getPrefixedKey(final String key, final boolean useOnlyLocalPrefixes) {
		lock.readLock().lock();
		try {
			final String prefix = (useOnlyLocalPrefixes) ? getLocalPrefix() : getPrefix();
			return (prefix != null) ? getPrefixedKey(prefix, key) : key;
		} finally {
			lock.readLock().unlock();
		}
	}
422603
@Override
  public String getPrefix(String namespaceURI) {
    // per javax.xml.namespace.NamespaceContext doc
    if (namespaceURI == null)
      throw new IllegalArgumentException("Cannot find prefix for null namespace URI");
    if (XMLConstants.XML_NS_URI.equals(namespaceURI))
      return XMLConstants.XML_NS_PREFIX;
    if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))
      return XMLConstants.XMLNS_ATTRIBUTE;

    for (Map.Entry<String, String> entry: bindings.entrySet()) {
      if (namespaceURI.equals(entry.getValue()))
        return entry.getKey();
    }

    return null;
  }
770968
@Override
    public void setCompletedPrefix(long newPrefix)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setCompletedPrefix", Long.valueOf(newPrefix));

        // If the completedPrefix is updated then update the 
        // other control variables.
        //We synchronize to ensure the saftey
        synchronized (oststream) //defect 256036
        {
            if (oststream.setCompletedPrefix(newPrefix) == true)
            {
                doubtHorizon = newPrefix + 1;
                unknownHorizon = newPrefix;

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(tc, "doubtHorizon:" + doubtHorizon + " unknownHorizon:" + unknownHorizon);
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setCompletedPrefix");
    }
1291187
public static Predicate<String> startsWith(final String prefix) {
		return new Predicate<String>() {
			@Override
			public boolean apply(final String input) {
				return input.startsWith(prefix);
			}
		};
	}
1132929
private static boolean missingFormatArgs(String value) {
    try {
      Formatter.check(value);
    } catch (MissingFormatArgumentException e) {
      return true;
    } catch (Exception ignored) {
      // we don't care about other errors (it isn't supposed to be a format string)
    }
    return false;
  }
1108760
public static String replaceSupplementary(final String value)
    {
        return InterpolationHelper.replaceSupplementary(value, new Replacer()
        {
            public String replace(String in)
            {
                return Strings.nullToEmpty(UCharacter.getName(in, ", "));
            }
        });
    }
1192593
static String convertValidPropertyMethodSuffix(String suffix) {
        if (suffix.length() == 0) return null;

        // We assume all characters are Character.isJavaIdentifierPart, but the first one may not be a valid
        // starting character.
        if (!Character.isJavaIdentifierStart(suffix.charAt(0))) return null;

        if (suffix.length() == 1) {
            return Character.isUpperCase(suffix.charAt(0)) ? suffix.toLowerCase() : null;
        }
        if (Character.isUpperCase(suffix.charAt(1))) {
            // "aProperty", "AProperty"
            return suffix;
        }
        if (Character.isUpperCase(suffix.charAt(0))) {
            return Character.toLowerCase(suffix.charAt(0)) + suffix.substring(1);
        }
        if('_' == suffix.charAt(0)) {
            return suffix;
        }
        return null;
    }
1200383
public static String removePrefix(final String text, final String prefix) {
        if (text != null) {
            return text.replaceFirst(prefix, "");
        }
        return null;
    }
1345491
public static String termPrefix(String term) {
    int i = term.indexOf(MtasToken.DELIMITER);
    String prefix = term;
    if (i >= 0) {
      prefix = term.substring(0, i);
    }
    return prefix.replace("\u0000", "");
  }
885791
def _getUniquePrefix(self):
        '''
        '''
        while 1:
            self._indx += 1
            prefix = 'ns%d' %self._indx
            try:
                self._dom.findNamespaceURI(prefix, self._getNode())
            except DOMException, ex:
                break
        return prefix
995009
public final void setGuaranteedValueCompletedPrefix(long value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setGuaranteedValueCompletedPrefix", Long.valueOf(value));
        getHdr2().setLongField(JsHdr2Access.GUARANTEEDVALUE_SET_COMPLETEDPREFIX, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setGuaranteedValueCompletedPrefix");
    }
526637
public IsEmptyBuilder append(final char value) {
        if(isNotEmpty()) {
            return this;
        }

        final String str = (value == '\u0000' ? "" : String.valueOf(value));
        return append(str);
    }
578906
public static String ensureLeft(final String value, final String prefix, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (caseSensitive) {
            return value.startsWith(prefix) ? value : prefix + value;
        }
        String _value = value.toLowerCase();
        String _prefix = prefix.toLowerCase();
        return _value.startsWith(_prefix) ? value : prefix + value;
    }
560424
public static boolean isSinglePositionPrefix(FieldInfo fieldInfo,
      String prefix) throws IOException {
    if (fieldInfo == null) {
      throw new IOException("no fieldInfo");
    } else {
      String info = fieldInfo.getAttribute(
          MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION);
      if (info == null) {
        throw new IOException("no "
            + MtasCodecPostingsFormat.MTAS_FIELDINFO_ATTRIBUTE_PREFIX_SINGLE_POSITION);
      } else {
        return Arrays.asList(info.split(Pattern.quote(MtasToken.DELIMITER)))
            .contains(prefix);
      }
    }
  }
592618
public String getPrefix(String namespaceURI)
    {
        String prefix = m_prefixMap.lookupPrefix(namespaceURI);
        return prefix;
    }
853776
@Override
	public boolean containsValidPrefix(final String key) {
		if (key != null) {
			lock.readLock().lock();
			try {
				for (final String aPrefix : prefixes) {
					if (key.equals(aPrefix) || key.startsWith(aPrefix + getPrefixDelimiter())) {
						return true;
					}
				}
			} finally {
				lock.readLock().unlock();
			}
		}
		return false;
	}