Example usage for com.badlogic.gdx.utils Bits length

List of usage examples for com.badlogic.gdx.utils Bits length

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils Bits length.

Prototype

public int length() 

Source Link

Document

Returns the "logical size" of this bitset: the index of the highest set bit in the bitset plus one.

Usage

From source file:com.badlogic.ashley.core.Family.java

License:Apache License

private static String getBitsString(Bits bits) {
    StringBuilder stringBuilder = new StringBuilder();

    int numBits = bits.length();
    for (int i = 0; i < numBits; ++i) {
        stringBuilder.append(bits.get(i) ? "1" : "0");
    }// w  w w .j a v a  2  s .c om

    return stringBuilder.toString();
}