Example usage for com.badlogic.gdx.utils ObjectIntMap values

List of usage examples for com.badlogic.gdx.utils ObjectIntMap values

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils ObjectIntMap values.

Prototype

public Values values() 

Source Link

Document

Returns an iterator for the values in the map.

Usage

From source file:com.vlaaad.common.util.MapHelper.java

License:Open Source License

public static boolean isEmpty(ObjectIntMap<?> potions) {
    ObjectIntMap.Values values = potions.values();
    while (values.hasNext()) {
        if (values.next() != 0)
            return false;
    }//from  w  w  w . j av a2  s  . co  m
    return true;
}

From source file:com.vlaaad.dice.game.user.UserData.java

License:Open Source License

public int potionsCount() {
    int r = 0;//from  ww  w  .  j a v  a2  s  .  c  om
    ObjectIntMap.Values v = potions.values();
    while (v.hasNext()) {
        r += v.next();
    }
    return r;
}