001    package railo.commons.lang.types;
002    
003    /**
004     * Integer Type that can be modified
005     */
006    public final class RefLongImpl implements RefLong {
007    
008        private long value;
009    
010    
011        /**
012         * Constructor of the class
013         * @param value
014         */
015        public RefLongImpl(long value) {
016            this.value=value;
017        }
018        
019        /**
020         * Constructor of the class
021         */
022        public RefLongImpl() {
023        }
024        
025        @Override
026        public void setValue(long value) {
027            this.value = value;
028        }
029        
030        @Override
031        public void plus(long value) {
032            this.value+=value;
033        }
034        
035        @Override
036        public void minus(long value) {
037            this.value-=value;
038        }
039    
040        @Override
041        public Long toLong() {
042            return Long.valueOf(value);
043        }
044        
045            @Override
046            public long toLongValue() {
047                    return value;
048            }
049            
050        @Override
051        public String toString() {
052            return String.valueOf(value);
053        }
054    }