Code example for AtomicReference

Methods: compareAndSet, get

0
    public Class<? extends TMapComponent> getComponentType() {
        return myComponentType;
    } 
     
    public String getDisplayName() {
        if (myDisplayName.get() == null) {
            try { 
                myDisplayName.compareAndSet(null,
                        NbBundle.getMessage(NodeType.class, this.toString()));
            } catch(Exception ex) {
                myDisplayName.compareAndSet(null, name());
            } 
        } 
        return myDisplayName.get();
    } 
     
    public String getDisplayName(Object modificator) {
        String displayName = null;
        try { 
            String key = this.toString() + "_" + modificator.toString();
            displayName = NbBundle.getMessage(NodeType.class, key);