/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public synchronized StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public synchronized StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public synchronized StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstString value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */ public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstUtf8 value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }