org.eclipse.collections.impl.set.mutable.primitive.LongHashSet.allocateTable()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.eclipse.collections.impl.set.mutable.primitive.LongHashSet.allocateTable()方法的一些代码示例,展示了LongHashSet.allocateTable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LongHashSet.allocateTable()方法的具体详情如下:
包路径:org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
类名称:LongHashSet
方法名:allocateTable

LongHashSet.allocateTable介绍

暂无

代码示例

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet()
{
  this.allocateTable(DEFAULT_INITIAL_CAPACITY);
}

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet()
{
  this.allocateTable(DEFAULT_INITIAL_CAPACITY);
}

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet(LongHashSet set)
{
  this.occupiedWithData = set.occupiedWithData;
  this.occupiedWithSentinels = set.occupiedWithSentinels;
  this.zeroToThirtyOneOccupied = set.zeroToThirtyOneOccupied;
  this.zeroToThirtyOne = set.zeroToThirtyOne;
  this.allocateTable(set.table.length);
  System.arraycopy(set.table, 0, this.table, 0, set.table.length);
}

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet(LongHashSet set)
{
  this.occupiedWithData = set.occupiedWithData;
  this.occupiedWithSentinels = set.occupiedWithSentinels;
  this.zeroToThirtyOneOccupied = set.zeroToThirtyOneOccupied;
  this.zeroToThirtyOne = set.zeroToThirtyOne;
  this.allocateTable(set.table.length);
  System.arraycopy(set.table, 0, this.table, 0, set.table.length);
}

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet(int initialCapacity)
{
  if (initialCapacity < 0)
  {
    throw new IllegalArgumentException("initial capacity cannot be less than 0");
  }
  int capacity = this.smallestPowerOfTwoGreaterThan(initialCapacity << 1);
  this.allocateTable(capacity);
}

代码示例来源:origin: eclipse/eclipse-collections

public LongHashSet(int initialCapacity)
{
  if (initialCapacity < 0)
  {
    throw new IllegalArgumentException("initial capacity cannot be less than 0");
  }
  int capacity = this.smallestPowerOfTwoGreaterThan(initialCapacity << 1);
  this.allocateTable(capacity);
}

代码示例来源:origin: eclipse/eclipse-collections

private void rehash(int newCapacity)
{
  int oldLength = this.table.length;
  long[] old = this.table;
  this.allocateTable(newCapacity);
  this.occupiedWithData = 0;
  this.occupiedWithSentinels = 0;
  for (int i = 0; i < oldLength; i++)
  {
    if (isNonSentinel(old[i]))
    {
      this.add(old[i]);
    }
  }
}

代码示例来源:origin: eclipse/eclipse-collections

private void rehash(int newCapacity)
{
  int oldLength = this.table.length;
  long[] old = this.table;
  this.allocateTable(newCapacity);
  this.occupiedWithData = 0;
  this.occupiedWithSentinels = 0;
  for (int i = 0; i < oldLength; i++)
  {
    if (isNonSentinel(old[i]))
    {
      this.add(old[i]);
    }
  }
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections

public LongHashSet()
{
  this.allocateTable(DEFAULT_INITIAL_CAPACITY);
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections

public LongHashSet(LongHashSet set)
{
  this.occupiedWithData = set.occupiedWithData;
  this.occupiedWithSentinels = set.occupiedWithSentinels;
  this.zeroToThirtyOneOccupied = set.zeroToThirtyOneOccupied;
  this.zeroToThirtyOne = set.zeroToThirtyOne;
  this.allocateTable(set.table.length);
  System.arraycopy(set.table, 0, this.table, 0, set.table.length);
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections

public LongHashSet(int initialCapacity)
{
  if (initialCapacity < 0)
  {
    throw new IllegalArgumentException("initial capacity cannot be less than 0");
  }
  int capacity = this.smallestPowerOfTwoGreaterThan(this.fastCeil(initialCapacity * OCCUPIED_DATA_RATIO));
  this.allocateTable(capacity);
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections

private void rehash(int newCapacity)
{
  int oldLength = this.table.length;
  long[] old = this.table;
  this.allocateTable(newCapacity);
  this.occupiedWithData = 0;
  this.occupiedWithSentinels = 0;
  for (int i = 0; i < oldLength; i++)
  {
    if (isNonSentinel(old[i]))
    {
      this.add(old[i]);
    }
  }
}

相关文章