public static BitSet getSwitchGroupAddress(String address) {
        if (address.length() != 5) {
            throw new IllegalArgumentException("the switchGroupAddress must consist of exactly 5 bits!");
        }
        BitSet bitSet = new BitSet(5);
        for (int i = 0; i < 5; i++) {
            bitSet.set(i, address.charAt(i) == '1');
        }
        return bitSet;
    }
public static BitSet getSwitchGroupAddress ( String address ) { if ( address . length ( ) != 5 ) { throw new IllegalArgumentException ( "the switchGroupAddress must consist of exactly 5 bits!" ) ; } BitSet bitSet = new BitSet ( 5 ) ; for ( int i = 0 ; i < 5 ; i ++ ) { bitSet . set ( i , address . charAt ( i ) == '1' ) ; } return bitSet ; }
convenient method to convert a string like "11011" to a BitSet.

@param address the string representation of the rc address
@return a bitset containing the address that can be used for
switchOn()/switchOff()