src/main/java/com/alipay/remoting/config/switches/ProtocolSwitch.java
public static ProtocolSwitch create(int[] index) {
        ProtocolSwitch status = new ProtocolSwitch();
        for (int i = 0; i < index.length; ++i) {
            status.turnOn(index[i]);
        }
        return status;
    }
public static ProtocolSwitch create(int[] index) {
        ProtocolSwitch status = new ProtocolSwitch();
        for (int i = 0; i < index.length; ++i) {
            status.turnOn(index[i]);
        }
        return status;
    }
create an instance of {@link ProtocolSwitch} according to switch index

@param index the switch index which you want to set true
@return ProtocolSwitchStatus with initialized bit set.