本文整理了Java中org.qi4j.api.property.Property.set()
方法的一些代码示例,展示了Property.set()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.set()
方法的具体详情如下:
包路径:org.qi4j.api.property.Property
类名称:Property
方法名:set
[英]Set the value of the property
[中]设置属性的值
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
@Override
public void set( Object newValue )
throws IllegalArgumentException, IllegalStateException
{
next.set( newValue );
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Float> add( Property<Float> property, float amount )
{
property.set( property.get() + amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Integer> mult( Property<Integer> property, int amount )
{
property.set( property.get() * amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Long> div( Property<Long> property, long amount )
{
property.set( property.get() / amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Double> div( Property<Double> property, double amount )
{
property.set( property.get() / amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<BigDecimal> add( Property<BigDecimal> property, BigDecimal amount )
{
property.set( property.get().add( amount ) );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<BigDecimal> sub( Property<BigDecimal> property, BigDecimal amount )
{
property.set( property.get().subtract( amount ) );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Long> sub( Property<Long> property, long amount )
{
property.set( property.get() - amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Double> mult( Property<Double> property, double amount )
{
property.set( property.get() * amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Float> div( Property<Float> property, float amount )
{
property.set( property.get() / amount );
return property;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<BigDecimal> div( Property<BigDecimal> property, BigDecimal amount )
{
property.set( property.get().divide( amount ) );
return property;
}
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.api
public static Property<Long> add( Property<Long> property, long amount )
{
property.set( property.get() + amount );
return property;
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.logging
private void setStandardStuff( LogType type, Composite composite, String category, String message,
LogRecord state, List<Serializable> params )
{
state.logtype().set( type );
state.time().set( System.currentTimeMillis() );
state.category().set( category );
state.message().set( message );
state.compositeTypeName().set( getCompositeName( composite ) );
state.threadName().set( Thread.currentThread().getName() );
state.parameters().set( params );
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.rdf
private static String getRepositoryUrl( HttpRepositoryConfiguration configuration )
{
Property<String> repositoryUrl = configuration.repositoryUrl();
String url = repositoryUrl.get();
if( url == null )
{
url = "http://localhost:8183/";
repositoryUrl.set( url );
}
return url;
}
代码示例来源:origin: org.codeartisans.qipki/qipki-ca-http
@Override
public RestListValue newListRepresentationValue( Reference listRef, int start, Iterable<RestValue> items )
{
ValueBuilder<RestListValue> builder = vbf.newValueBuilder( RestListValue.class );
RestListValue listRepresentation = builder.prototype();
listRepresentation.uri().set( listRef.toString() );
listRepresentation.start().set( start );
for ( RestValue eachItem : items ) {
listRepresentation.items().get().add( eachItem );
}
return builder.newInstance();
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.scheduler
private CronSchedule newTransientCronSchedule( Task task, String cronExpression, DateTime start )
{
ValueBuilder<CronSchedule> builder = module.newValueBuilder( CronSchedule.class );
CronSchedule prototype = builder.prototype();
prototype.task().set( task );
prototype.start().set( start );
prototype.identity().set( uuid.generate( CronSchedule.class ) );
prototype.cronExpression().set( cronExpression );
CronSchedule schedule = builder.newInstance();
logger.info( "Schedule {} created: {}", schedule.presentationString(), schedule.identity().get() );
return schedule;
}
代码示例来源:origin: org.qi4j.core/org.qi4j.core.testsupport
private BarEntity buildBarEntity( String cathedral )
{
EntityBuilder<BarEntity> barBuilder = module.currentUnitOfWork().newEntityBuilder( BarEntity.class );
barBuilder.instance().cathedral().set( cathedral );
return barBuilder.newInstance();
}
代码示例来源:origin: org.codeartisans.qipki/qipki-ca
@Override
public EscrowedKeyPair create( AsymetricAlgorithm algorithm, Integer length )
{
EntityBuilder<EscrowedKeyPair> builder = uowf.currentUnitOfWork().newEntityBuilder( EscrowedKeyPair.class );
EscrowedKeyPair ekp = builder.instance();
ekp.algorithm().set( algorithm );
ekp.length().set( length );
ekp = builder.newInstance();
KeyPair keyPair = asymGenerator.generateKeyPair( new AsymetricGeneratorParameters( algorithm, length ) );
writeToFile( cryptIO.asPEM( keyPair ), ekp.managedFile() );
return ekp;
}
代码示例来源:origin: org.codeartisans.qipki/qipki-ca-http
@Override
public X509ProfileValue x509Profile( X509Profile x509Profile )
{
ValueBuilder<X509ProfileValue> x509ProfileValueBuilder = vbf.newValueBuilder( X509ProfileValue.class );
CaUriBuilder caUriBuilder = new CaUriBuilder( restApi.apiRootRef() );
X509ProfileValue x509ProfileValue = x509ProfileValueBuilder.prototype();
x509ProfileValue.uri().set( caUriBuilder.x509Profile().withIdentity( x509Profile.identity().get() ).build() );
x509ProfileValue.name().set( x509Profile.name().get() );
x509ProfileValue.validityDays().set( x509Profile.validityDays().get() );
return x509ProfileValueBuilder.newInstance();
}
代码示例来源:origin: org.codeartisans.qipki/qipki-ca-http
@Override
public CryptoStoreValue cryptoStore( CryptoStore cs )
{
ValueBuilder<CryptoStoreValue> ksValueBuilder = vbf.newValueBuilder( CryptoStoreValue.class );
CaUriBuilder caUriBuilder = new CaUriBuilder( restApi.apiRootRef() );
CryptoStoreValue ksValue = ksValueBuilder.prototype();
ksValue.uri().set( caUriBuilder.cryptoStore().withIdentity( cs.identity().get() ).build() );
ksValue.name().set( cs.name().get() );
ksValue.storeType().set( cs.storeType().get() );
return ksValueBuilder.newInstance();
}
内容来源于网络,如有侵权,请联系作者删除!