Code example for Interner

Methods: intern

0
        return make(name, revision, false);
    } 
 
    public static CvsFile make(final String name, final String revision,
                    final boolean isDead) {
        return INTERNER.intern(new CvsFile(name, revision, isDead));
    } 
 
    private CvsFile(final String name, final String revision,
                    final boolean isDead) {
        // Could intern name in a separate INTERNER, though most files will probably not have been modified recently anyway. 
        this.name = name;
        this.revision = revision.intern();
        dead = isDead;
    } 
 
    private Object readResolve() { 
        // Could make(name, revision, dead) to reintern revision, but probably pointless since com.thoughtworks.xstream.converters.basic.StringConverter caches instances. 
        return INTERNER.intern(this);
    } 
Contextual code suggestions in your IDE  Get Codota for Java