oshi.hardware.common.AbstractSoundCard Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
/**
* MIT License
*
* Copyright (c) 2010 - 2020 The OSHI Project Contributors: https://github.com/oshi/oshi/graphs/contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package oshi.hardware.common;
import oshi.annotation.concurrent.Immutable;
import oshi.hardware.SoundCard;
/**
* An abstract Sound Card
*/
@Immutable
public abstract class AbstractSoundCard implements SoundCard {
private String kernelVersion;
private String name;
private String codec;
/**
* Abstract Sound Card Constructor
*
* @param kernelVersion
* The version
* @param name
* The name
* @param codec
* The codec
*/
public AbstractSoundCard(String kernelVersion, String name, String codec) {
this.kernelVersion = kernelVersion;
this.name = name;
this.codec = codec;
}
@Override
public String getDriverVersion() {
return this.kernelVersion;
}
@Override
public String getName() {
return this.name;
}
@Override
public String getCodec() {
return this.codec;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("SoundCard@");
builder.append(Integer.toHexString(hashCode()));
builder.append(" [name=");
builder.append(this.name);
builder.append(", kernelVersion=");
builder.append(this.kernelVersion);
builder.append(", codec=");
builder.append(this.codec);
builder.append(']');
return builder.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy