本文整理汇总了Java中gnu.trove.impl.Constants类的典型用法代码示例。如果您正苦于以下问题:Java Constants类的具体用法?Java Constants怎么用?Java Constants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Constants类属于gnu.trove.impl包,在下文中一共展示了Constants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TByteHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TByteHash</code> instance whose capacity
* is the next highest prime above <tt>initialCapacity + 1</tt>
* unless that value is already prime.
*
* @param initialCapacity an <code>int</code> value
*/
public TByteHash( int initialCapacity ) {
super( initialCapacity );
no_entry_value = Constants.DEFAULT_BYTE_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( byte ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例2: TObjectDoubleCustomHashMap
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TObjectDoubleHashMap</code> instance with a prime
* capacity equal to or greater than <tt>initialCapacity</tt> and
* with the default load factor.
*
* @param initialCapacity an <code>int</code> value
*/
public TObjectDoubleCustomHashMap( HashingStrategy<? super K> strategy,
int initialCapacity ) {
super( strategy, initialCapacity );
no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE;
}
示例3: TByteHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TByteHash</code> instance with the default
* capacity and load factor.
*/
public TByteHash() {
super();
no_entry_value = Constants.DEFAULT_BYTE_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( byte ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例4: TDoubleHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TDoubleHash</code> instance with a prime
* value at or near the specified capacity and load factor.
*
* @param initialCapacity used to find a prime capacity for the table.
* @param loadFactor used to calculate the threshold over which
* rehashing takes place.
*/
public TDoubleHash( int initialCapacity, float loadFactor ) {
super(initialCapacity, loadFactor);
no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( double ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例5: TFloatHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TFloatHash</code> instance with the default
* capacity and load factor.
*/
public TFloatHash() {
super();
no_entry_value = Constants.DEFAULT_FLOAT_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( float ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例6: TDoubleHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TDoubleHash</code> instance with the default
* capacity and load factor.
*/
public TDoubleHash() {
super();
no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( double ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例7: TObjectLongCustomHashMap
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TObjectLongHashMap</code> instance with a prime
* capacity equal to or greater than <tt>initialCapacity</tt> and
* with the default load factor.
*
* @param initialCapacity an <code>int</code> value
*/
public TObjectLongCustomHashMap( HashingStrategy<? super K> strategy,
int initialCapacity ) {
super( strategy, initialCapacity );
no_entry_value = Constants.DEFAULT_LONG_NO_ENTRY_VALUE;
}
示例8: TCharHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TCharHash</code> instance with a prime
* value at or near the specified capacity and load factor.
*
* @param initialCapacity used to find a prime capacity for the table.
* @param loadFactor used to calculate the threshold over which
* rehashing takes place.
*/
public TCharHash( int initialCapacity, float loadFactor ) {
super(initialCapacity, loadFactor);
no_entry_value = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( char ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例9: TObjectCharCustomHashMap
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TObjectCharHashMap</code> instance with a prime
* capacity equal to or greater than <tt>initialCapacity</tt> and
* with the default load factor.
*
* @param initialCapacity an <code>int</code> value
*/
public TObjectCharCustomHashMap( HashingStrategy<? super K> strategy,
int initialCapacity ) {
super( strategy, initialCapacity );
no_entry_value = Constants.DEFAULT_CHAR_NO_ENTRY_VALUE;
}
示例10: TIntHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TIntHash</code> instance whose capacity
* is the next highest prime above <tt>initialCapacity + 1</tt>
* unless that value is already prime.
*
* @param initialCapacity an <code>int</code> value
*/
public TIntHash( int initialCapacity ) {
super( initialCapacity );
no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( int ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例11: TLongHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TLongHash</code> instance whose capacity
* is the next highest prime above <tt>initialCapacity + 1</tt>
* unless that value is already prime.
*
* @param initialCapacity an <code>int</code> value
*/
public TLongHash( int initialCapacity ) {
super( initialCapacity );
no_entry_value = Constants.DEFAULT_LONG_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( long ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例12: TShortHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TShortHash</code> instance with the default
* capacity and load factor.
*/
public TShortHash() {
super();
no_entry_value = Constants.DEFAULT_SHORT_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( short ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}
示例13: TObjectIntCustomHashMap
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TObjectIntHashMap</code> instance with a prime
* capacity equal to or greater than <tt>initialCapacity</tt> and
* with the default load factor.
*
* @param initialCapacity an <code>int</code> value
*/
public TObjectIntCustomHashMap( HashingStrategy<? super K> strategy,
int initialCapacity ) {
super( strategy, initialCapacity );
no_entry_value = Constants.DEFAULT_INT_NO_ENTRY_VALUE;
}
示例14: TObjectFloatCustomHashMap
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TObjectFloatHashMap</code> instance with a prime
* capacity equal to or greater than <tt>initialCapacity</tt> and
* with the default load factor.
*
* @param initialCapacity an <code>int</code> value
*/
public TObjectFloatCustomHashMap( HashingStrategy<? super K> strategy,
int initialCapacity ) {
super( strategy, initialCapacity );
no_entry_value = Constants.DEFAULT_FLOAT_NO_ENTRY_VALUE;
}
示例15: TDoubleHash
import gnu.trove.impl.Constants; //导入依赖的package包/类
/**
* Creates a new <code>TDoubleHash</code> instance whose capacity
* is the next highest prime above <tt>initialCapacity + 1</tt>
* unless that value is already prime.
*
* @param initialCapacity an <code>int</code> value
*/
public TDoubleHash( int initialCapacity ) {
super( initialCapacity );
no_entry_value = Constants.DEFAULT_DOUBLE_NO_ENTRY_VALUE;
//noinspection RedundantCast
if ( no_entry_value != ( double ) 0 ) {
Arrays.fill( _set, no_entry_value );
}
}