com.maxifier.mxcache.impl.caches.def.FloatStorageImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.impl.caches.def;
import com.maxifier.mxcache.storage.*;
/**
* THIS IS GENERATED CLASS! DON'T EDIT IT MANUALLY!
*
* GENERATED FROM PStorageImpl.template
*
* @author Andrey Yakoushin ([email protected])
* @author Alexander Kochurov ([email protected])
*/
public class FloatStorageImpl implements FloatStorage {
private volatile boolean set;
private float value;
@Override
public boolean isCalculated() {
return set;
}
@Override
public float load() {
return value;
}
@Override
public void save(float v) {
set = true;
value = v;
}
@Override
public void clear() {
set = false;
}
@Override
public int size() {
return set ? 1 : 0;
}
}