Пример #1
0
 def fromNullableList(cls, nullableList):
     """ generated source for method fromNullableList """
     builder = ImmutableMap.builder()
     i = 0
     while i < len(nullableList):
         if nullableList.get(i) != None:
             builder.put(i, nullableList.get(i))
         i += 1
     return builder.build()
Пример #2
0
 def copyUsingCartesianDomains(cls, otherModel):
     """ generated source for method copyUsingCartesianDomains """
     if isinstance(otherModel, (ImmutableSentenceDomainModel, )):
         return otherModel
     domains = ImmutableMap.builder()
     for form in otherModel.getSentenceForms():
         while i < form.getTupleSize():
             domainsForSlots.add(otherDomain.getDomainForSlot(i))
             i += 1
         domains.put(form, CartesianSentenceFormDomain.create(form, domainsForSlots))
     return ImmutableSentenceDomainModel(ImmutableSentenceFormModel.copyOf(otherModel), domains.build())