cacheablelongarray.java
来自「jive 2.1.1 的源码」· Java 代码 · 共 47 行
JAVA
47 行
/**
* $RCSfile: CacheableLongArray.java,v $
* $Revision: 1.2 $
* $Date: 2001/07/31 05:38:28 $
*
* Copyright (C) 1999-2001 CoolServlets, Inc. All rights reserved.
*
* This software is the proprietary information of CoolServlets, Inc.
* Use is subject to license terms.
*/
package com.jivesoftware.util;
/**
* Wrapper for long[] values so they can be treated as cacheable objects.
*/
public class CacheableLongArray implements Cacheable {
/**
* Wrapped long object.
*/
private long[] longArray;
/**
* Creates a new CacheableLong.
*
* @param string the Long object to wrap.
*/
public CacheableLongArray(long[] longArray) {
this.longArray = longArray;
}
/**
* Returns the long [] wrapped by the CacheableLongArray object.
*
* @return the long [] object.
*/
public long[] getLongArray() {
return longArray;
}
//FROM THE CACHEABLE INTERFACE//
public int getSize() {
return CacheSizes.sizeOfObject() + CacheSizes.sizeOfLong() * longArray.length;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?