use of io.nem.symbol.catapult.builders.MosaicRestrictionKeyDto in project nem2-sdk-java by nemtech.
the class MosaicGlobalRestriction method toGlobalKeyValueSetBuilder.
private GlobalKeyValueBuilder toGlobalKeyValueSetBuilder(Entry<BigInteger, MosaicGlobalRestrictionItem> entry) {
MosaicRestrictionKeyDto key = new MosaicRestrictionKeyDto(entry.getKey().longValue());
MosaicIdDto referenceMosaicId = SerializationUtils.toMosaicIdDto(entry.getValue().getReferenceMosaicId());
long restrictionValue = entry.getValue().getRestrictionValue().longValue();
MosaicRestrictionTypeDto restrictionType = MosaicRestrictionTypeDto.rawValueOf(entry.getValue().getRestrictionType().getValue());
RestrictionRuleBuilder restrictionRule = RestrictionRuleBuilder.create(referenceMosaicId, restrictionValue, restrictionType);
return GlobalKeyValueBuilder.create(key, restrictionRule);
}
Aggregations