Code example for AtomicLong

Methods: getAndIncrement

0
        public Synthetic get(Object object) {
            // This may give us data races, but these don't matter as Annotation use it's type and it's members values 
            // for equality, it does not use instance equality. 
            // Note that count is atomic 
            if (!synthetics.containsKey(object)) {
                synthetics.put(object, new Synthetic.SyntheticLiteral(namespace, count.getAndIncrement()));
            } 
            return synthetics.get(object);
        } 
 
        /** 
         * Get a synthetic qualifier. The qualifier will not be stored for later 
         * retrieval. 
         * 
         * @return 
         */ 
        public Synthetic get() { 
            return new Synthetic.SyntheticLiteral(namespace, count.getAndIncrement());
        } 
 
        public void clear() {