Examples of containsAtLeast()


Examples of aterm.ATermAppl.containsAtLeast()

            }

      /*
       * Second half of condition 9 - 11 block
       */
      if (dr.containsAtLeast(inequalityCount(ne, i) + 1)) {
        it.remove();
        removeInequalities(ne, i);
        continue;
      }

View Full Code Here

Examples of aterm.ATermAppl.containsAtLeast()

      }

      /*
       * Data range is a singleton, replace variable with constant (lines 17 - 18)
       */
      if (dr.isFinite() && dr.isEnumerable() && !dr.containsAtLeast(2)) {
        final Object c = dr.valueIterator().next();
        it.remove();
        consts.add(i);
        constValues[i] = c;
        normalized[i] = TRIVIALLY_SATISFIABLE;
View Full Code Here

Examples of aterm.ATermAppl.containsAtLeast()

      final DataRange<?> dr = normalized[i];

      final Set<Integer> diffs = ne[i];
      final int min = (diffs == null) ? 1 : diffs.size() + 1;
      if (dr.containsAtLeast(min)) {
        it.remove();
        for (int j : diffs) {
          if (ne[j] != null) {
                      ne[j].remove(i);
                    }
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.DatatypeReasoner.containsAtLeast()

          reportClash( Clash.valueDatatype( this, ds, (ATermAppl) atermValue.getArgument(0), dt[0] ) );
        }
      }
      else {
        if( dtReasoner.isSatisfiable( types ) ) {
          if ( !dtReasoner.containsAtLeast( 2, types ) ) {
            /*
             * This literal is a variable, but given current ranges can only
             * take on a single value.  Merge with that value.
             */
            final Object value = dtReasoner.valueIterator( types ).next();
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.types.real.RestrictedRealDatatype.containsAtLeast()

    assertFalse( dr.contains( 4 ) );

    assertTrue( dr.isEmpty() );
    assertTrue( dr.isFinite() );
    assertTrue( dr.isEnumerable() );
    assertTrue( dr.containsAtLeast( 0 ) );
    assertFalse( dr.containsAtLeast( 1 ) );
  }

  /**
   * Test that an integer is correctly excluded from an infinite continuous
View Full Code Here

Examples of com.clarkparsia.pellet.datatypes.types.real.RestrictedRealDatatype.containsAtLeast()

    assertTrue( dr.isEmpty() );
    assertTrue( dr.isFinite() );
    assertTrue( dr.isEnumerable() );
    assertTrue( dr.containsAtLeast( 0 ) );
    assertFalse( dr.containsAtLeast( 1 ) );
  }

  /**
   * Test that an integer is correctly excluded from an infinite continuous
   * interval
 
View Full Code Here

Examples of org.bukkit.inventory.Inventory.containsAtLeast()

    private static int getStackAmount(ItemStack item, Inventory inventory, Player player, Action action) {
        Action buy = Properties.REVERSE_BUTTONS ? LEFT_CLICK_BLOCK : RIGHT_CLICK_BLOCK;
        Inventory checkedInventory = (action == buy ? inventory : player.getInventory());

        if (checkedInventory.containsAtLeast(item, item.getMaxStackSize())) {
            return item.getMaxStackSize();
        } else {
            return InventoryUtil.getAmount(item, checkedInventory);
        }
    }
View Full Code Here

Examples of org.bukkit.inventory.PlayerInventory.containsAtLeast()

        // Check if they have the proper material to repair with
        if (!inventory.contains(repairMaterial)) {
            String prettyName = repairable.getRepairMaterialPrettyName() == null ? StringUtils.getPrettyItemString(repairMaterial) : repairable.getRepairMaterialPrettyName();
            String message = LocaleLoader.getString("Skills.NeedMore", prettyName);

            if (repairMaterialMetadata != (byte) -1 && !inventory.containsAtLeast(toRemove, 1)) {
                message += ":" + repairMaterialMetadata;
            }

            player.sendMessage(message);
            return;
View Full Code Here

Examples of org.bukkit.inventory.PlayerInventory.containsAtLeast()

        }

        PlayerInventory playerInventory = player.getInventory();
        ItemStack seed = new ItemStack(Material.SEEDS);

        if (!playerInventory.containsAtLeast(seed, 1)) {
            player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.NeedMore"));
            return false;
        }

        playerInventory.removeItem(seed);
View Full Code Here

Examples of org.bukkit.inventory.PlayerInventory.containsAtLeast()

            default:
                break;
        }

        if (!playerInventory.containsAtLeast(seed, 1)) {
            return;
        }

        if (!greenTerra && !SkillUtils.activationSuccessful(SecondaryAbility.GREEN_THUMB_PLANT, getPlayer(), getSkillLevel(), activationChance)) {
            return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.