📄 cacheableboolean.java
字号:
/**
* $RCSfile: CacheableBoolean.java,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:51:09 $
*
* New Jive from Jdon.com.
*
* This software is the proprietary information of CoolServlets, Inc.
* Use is subject to license terms.
*/
package com.jivesoftware.util;
/**
* Wrapper for boolean values so they can be treated as Cacheable objects.
*/
public class CacheableBoolean implements Cacheable {
/**
* Wrapped int value.
*/
private boolean booleanValue;
/**
* Creates a new CacheableBoolean.
*
* @param string the boolean value to wrap.
*/
public CacheableBoolean(boolean booleanValue) {
this.booleanValue = booleanValue;
}
/**
* Returns the underlying boolean value.
*
* @return the boolean value.
*/
public boolean getBoolean() {
return booleanValue;
}
//FROM THE CACHEABLE INTERFACE//
public int getSize() {
return CacheSizes.sizeOfObject() + CacheSizes.sizeOfBoolean();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -