Code example for Interner

Methods: intern

0
        return STR_CACHE.intern(v);
    } 
 
    /** Returns the canonical representation of a tag. */ 
    public static Tag intern(Tag t) {
        return TAG_CACHE.intern(t);
    } 
 
    /** 
     * Interns custom tag types, assumes that basic tags are already interned. This is used to 
     * ensure that we have a common view of tags internally. In particular, different subclasses of 
     * Tag may not be equal even if they have the same key and value. Tag lists should use this to 
     * ensure the equality will work as expected. 
     */ 
    static Tag internCustom(Tag t) {
        return (t instanceof BasicTag) ? t : newTag(t.getKey(), t.getValue());
    } 
 
    /** Create a new tag instance. */ 
    public static Tag newTag(String key, String value) {