< prev index next >

src/java.desktop/share/classes/javax/sound/sampled/Control.java

Print this page
rev 57600 : 8236980: toString() cleanup in JavaSound
Reviewed-by: XXX

*** 1,7 **** /* ! * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 64,80 **** public Type getType() { return type; } /** ! * Obtains a string describing the control type and its current state. * * @return a string representation of the control */ @Override public String toString() { ! return new String(getType() + " Control"); } /** * An instance of the {@code Type} class represents the type of the control. */ --- 64,80 ---- public Type getType() { return type; } /** ! * Returns a string representation of the control. * * @return a string representation of the control */ @Override public String toString() { ! return String.format("%s control", getType()); } /** * An instance of the {@code Type} class represents the type of the control. */
*** 118,131 **** public final int hashCode() { return super.hashCode(); } /** ! * Provides the {@code String} representation of the control type. This ! * {@code String} is the same name that was passed to the constructor. * ! * @return the control type name */ @Override public final String toString() { return name; } --- 118,130 ---- public final int hashCode() { return super.hashCode(); } /** ! * Returns type's name as the string representation of the control type. * ! * @return a string representation of the control type */ @Override public final String toString() { return name; }
< prev index next >