Code example for AtomicLong

Methods: getAndIncrement

        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());
Stop searching for code, let great code find you!  Add Codota to your java IDE