javax.sound.sampled.Control#Type ( )源码实例Demo

下面列出了javax.sound.sampled.Control#Type ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码2 项目: dragonwell8_jdk   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码3 项目: TencentKona-8   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码4 项目: TencentKona-8   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码5 项目: jdk8u60   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码6 项目: jdk8u60   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码7 项目: openjdk-jdk8u   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码8 项目: openjdk-jdk8u   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码9 项目: openjdk-jdk8u-backup   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码10 项目: openjdk-jdk8u-backup   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码11 项目: Bytecoder   文件: AbstractLine.java
@Override
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码12 项目: Bytecoder   文件: AbstractLine.java
@Override
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码13 项目: openjdk-jdk9   文件: AbstractLine.java
@Override
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码14 项目: openjdk-jdk9   文件: AbstractLine.java
@Override
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码15 项目: openjdk-jdk9   文件: ToString.java
public static void main(String args[]) throws Exception {
    System.out.println();
    System.out.println();
    System.out.println("4629190: CompoundControl: getMemberControls() and toString() throw NullPointerException");

    String firstControlTypeName = "first_Control_Type_Name";
    String secondControlTypeName = "second_Control_Type_Name";
    String thirdControlTypeName = "third_Control_Type_Name";

    Control.Type firstControlType = new TestControlType(firstControlTypeName);
    Control.Type secondControlType = new TestControlType(secondControlTypeName);
    Control.Type thirdControlType = new TestControlType(thirdControlTypeName);

    Control firstControl = new TestControl(firstControlType);
    Control secondControl = new TestControl(secondControlType);
    Control thirdControl = new TestControl(thirdControlType);

    String testCompoundControlTypeName = "CompoundControl_Type_Name";
    CompoundControl.Type testCompoundControlType
        = new TestCompoundControlType(testCompoundControlTypeName);

    Control[] setControls = { firstControl, secondControl, thirdControl };
    CompoundControl testedCompoundControl
        = new TestCompoundControl(testCompoundControlType, setControls);

    // this may throw exception if bug applies
    Control[] producedControls = testedCompoundControl.getMemberControls();
    System.out.println("Got "+producedControls.length+" member controls.");

    // this may throw exception if bug applies
    String producedString = testedCompoundControl.toString();
    System.out.println("toString() returned: "+producedString);

    System.out.println("Test passed.");
}
 
源代码16 项目: jdk8u-jdk   文件: AbstractLine.java
public final boolean isControlSupported(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType == null) {
        return false;
    }

    for (int i = 0; i < controls.length; i++) {
        if (controlType == controls[i].getType()) {
            return true;
        }
    }

    return false;
}
 
源代码17 项目: jdk8u-jdk   文件: AbstractLine.java
public final Control getControl(Control.Type controlType) {
    // protect against a NullPointerException
    if (controlType != null) {

        for (int i = 0; i < controls.length; i++) {
            if (controlType == controls[i].getType()) {
                return controls[i];
            }
        }
    }

    throw new IllegalArgumentException("Unsupported control type: " + controlType);
}
 
源代码18 项目: openjdk-jdk9   文件: ToString.java
TestControl(Control.Type type) {
    super(type);
}
 
源代码19 项目: openjdk-jdk9   文件: LineInfoNPE.java
public Control getControl(Control.Type control) {
    return null;
}
 
源代码20 项目: openjdk-jdk9   文件: LineInfoNPE.java
public boolean isControlSupported(Control.Type control) {
    return false;
}
 
 方法所在类
 同类方法