当前位置: 首页>>代码示例>>Java>>正文


Java EmptyArray.LONG属性代码示例

本文整理汇总了Java中libcore.util.EmptyArray.LONG属性的典型用法代码示例。如果您正苦于以下问题:Java EmptyArray.LONG属性的具体用法?Java EmptyArray.LONG怎么用?Java EmptyArray.LONG使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在libcore.util.EmptyArray的用法示例。


在下文中一共展示了EmptyArray.LONG属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LongSparseLongArray

/**
 * Creates a new SparseLongArray containing no mappings that will not
 * require any additional memory allocation to store the specified
 * number of mappings.  If you supply an initial capacity of 0, the
 * sparse array will be initialized with a light-weight representation
 * not requiring any additional array allocations.
 */
public LongSparseLongArray(int initialCapacity) {
    if (initialCapacity == 0) {
        mKeys = EmptyArray.LONG;
        mValues = EmptyArray.LONG;
    } else {
        mKeys = ArrayUtils.newUnpaddedLongArray(initialCapacity);
        mValues = new long[mKeys.length];
    }
    mSize = 0;
}
 
开发者ID:Gracker,项目名称:Android-Framework-Tools-Utils,代码行数:17,代码来源:LongSparseLongArray.java

示例2: LongSparseArray

/**
 * Creates a new LongSparseArray containing no mappings that will not
 * require any additional memory allocation to store the specified
 * number of mappings.  If you supply an initial capacity of 0, the
 * sparse array will be initialized with a light-weight representation
 * not requiring any additional array allocations.
 */
public LongSparseArray(int initialCapacity) {
    if (initialCapacity == 0) {
        mKeys = EmptyArray.LONG;
        mValues = EmptyArray.OBJECT;
    } else {
        mKeys = ArrayUtils.newUnpaddedLongArray(initialCapacity);
        mValues = ArrayUtils.newUnpaddedObjectArray(initialCapacity);
    }
    mSize = 0;
}
 
开发者ID:Gracker,项目名称:Android-Framework-Tools-Utils,代码行数:17,代码来源:LongSparseArray.java

示例3: SparseLongArray

/**
 * Creates a new SparseLongArray containing no mappings that will not
 * require any additional memory allocation to store the specified
 * number of mappings.  If you supply an initial capacity of 0, the
 * sparse array will be initialized with a light-weight representation
 * not requiring any additional array allocations.
 */
public SparseLongArray(int initialCapacity) {
    if (initialCapacity == 0) {
        mKeys = EmptyArray.INT;
        mValues = EmptyArray.LONG;
    } else {
        mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity);
        mKeys = new int[mValues.length];
    }
    mSize = 0;
}
 
开发者ID:Gracker,项目名称:Android-Framework-Tools-Utils,代码行数:17,代码来源:SparseLongArray.java

示例4: LongArray

/**
 * Creates an empty LongArray with the specified initial capacity.
 */
public LongArray(int initialCapacity) {
    if (initialCapacity == 0) {
        mValues = EmptyArray.LONG;
    } else {
        mValues = ArrayUtils.newUnpaddedLongArray(initialCapacity);
    }
    mSize = 0;
}
 
开发者ID:Gracker,项目名称:Android-Framework-Tools-Utils,代码行数:11,代码来源:LongArray.java


注:本文中的libcore.util.EmptyArray.LONG属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。