本文整理了Java中org.boon.Exceptions.requireNonNull()
方法的一些代码示例,展示了Exceptions.requireNonNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Exceptions.requireNonNull()
方法的具体详情如下:
包路径:org.boon.Exceptions
类名称:Exceptions
方法名:requireNonNull
暂无
代码示例来源:origin: boonproject/boon
public Pair(Pair<K, V> impl) {
requireNonNull( impl );
requireNonNull( impl.k );
this.k = impl.k;
this.v = impl.v;
}
代码示例来源:origin: boonproject/boon
public static long[] grow( long[] array, final int size ) {
Exceptions.requireNonNull( array );
long[] newArray = new long[ array.length + size ];
System.arraycopy( array, 0, newArray, 0, array.length );
return newArray;
}
代码示例来源:origin: boonproject/boon
private static byte[][] _grow( byte[][] array ) {
Exceptions.requireNonNull( array );
byte[][] newArray = new byte[ array.length * 2 ][];
System.arraycopy( array, 0, newArray, 0, array.length );
return newArray;
}
代码示例来源:origin: boonproject/boon
@Override
public boolean compareAndUpdate( KEY key, String property, Object compare, Object value ) {
requireNonNull( key, "key cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( compare, "compare cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "compareAndUpdate (key=%s, property=%s, compare=%s, set=%s)", key, property, compare, value );
return super.compareAndUpdate( key, property, compare, value );
}
代码示例来源:origin: boonproject/boon
@Override
public boolean compareAndUpdate( KEY key, String property, int compare, int value ) {
requireNonNull( key, "key cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( compare, "compare cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "compareAndUpdate (key=%s, property=%s, compare=%s, set=%s)", key, property, compare, value );
return super.compareAndUpdate( key, property, compare, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void modify( ITEM item, String property, int value ) {
requireNonNull( item, "item cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "modify (item=%s, property=%s, set=%s)", item, property, value );
super.modify( item, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void modify( ITEM item, String property, long value ) {
requireNonNull( item, "item cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "modify (item=%s, property=%s, set=%s)", item, property, value );
super.modify( item, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void modify( ITEM item, String property, short value ) {
requireNonNull( item, "item cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "modify (item=%s, property=%s, set=%s)", item, property, value );
super.modify( item, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void modify( ITEM item, String property, byte value ) {
requireNonNull( item, "item cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "modify (item=%s, property=%s, set=%s)", item, property, value );
super.modify( item, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void updateByValue( KEY key, String property, String value ) {
requireNonNull( key, "key cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "updateByValue (key=%s, property=%s, set=%s)", key, property, value );
super.updateByValue( key, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public void update( KEY key, String property, byte value ) {
requireNonNull( key, "key cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( value, "value cannot be null" );
log( "update (key=%s, property=%s, set=%s)", key, property, value );
super.update( key, property, value );
}
代码示例来源:origin: boonproject/boon
@Override
public boolean compareAndIncrement( KEY key, String property, short compare ) {
requireNonNull( key, "key cannot be null" );
requireNonNull( property, "property cannot be null" );
requireNonNull( compare, "compare cannot be null" );
log( "compareAndIncrement (key=%s, property=%s, set=%s)", key, property, compare );
return super.compareAndIncrement( key, property, compare );
}
代码示例来源:origin: boonproject/boon
@Universal
public static float[] add( float[] array, float v ) {
Exceptions.requireNonNull( array );
float[] newArray = new float[ array.length + 1 ];
System.arraycopy( array, 0, newArray, 0, array.length );
newArray[ array.length ] = v;
return newArray;
}
代码示例来源:origin: boonproject/boon
@Universal
public static byte[] copy( byte[] array, int offset, int length ) {
Exceptions.requireNonNull( array );
byte[] newArray = new byte[ length ];
System.arraycopy( array, offset, newArray, 0, length );
return newArray;
}
代码示例来源:origin: boonproject/boon
@Override
public void modify( ITEM item, Update... values ) {
requireNonNull( item, "item cannot be null" );
requireNonNull( values, "value cannot be null" );
log( "modify (item=%s, property=%s, update=%s)", item, values );
super.modify( item, values );
}
代码示例来源:origin: boonproject/boon
/**
* @param array
* @return
*/
@Universal
public static double[] array( final double... array ) {
Exceptions.requireNonNull( array );
return array;
}
代码示例来源:origin: boonproject/boon
@Universal
public static float[] add( float[] array, float[] array2 ) {
Exceptions.requireNonNull( array );
float[] newArray = new float[ array.length + array2.length ];
System.arraycopy( array, 0, newArray, 0, array.length );
System.arraycopy( array2, 0, newArray, array.length, array2.length );
return newArray;
}
代码示例来源:origin: boonproject/boon
public Criterion( String name, Operator operator, VALUE... values ) {
requireNonNull( name, "name cannot be null" );
requireNonNull( operator, "operator cannot be null" );
requireNonNull( values, "values cannot be null" );
path = isPropPath(name);
this.name = name;
this.operator = operator;
this.setValues( values );
hashCode = doHashCode();
toString = doToString();
}
代码示例来源:origin: boonproject/boon
public static byte[] addDouble( byte[] array, double value ) {
Exceptions.requireNonNull( array );
byte[] holder = new byte[ 4 ];
doubleTo( holder, 0, value );
return add( array, holder );
}
代码示例来源:origin: boonproject/boon
public boolean add( ITEM item ) {
Exceptions.requireNonNull( item, "No nulls allowed in repo" );
KEY key = getKey( item );
if ( primaryIndex.has( key ) ) {
return false;
}
validateIndexes( item );
return true;
}
内容来源于网络,如有侵权,请联系作者删除!