--- old/src/share/classes/javax/sound/sampled/Control.java 2014-06-01 18:59:17.000000000 +0400 +++ new/src/share/classes/javax/sound/sampled/Control.java 2014-06-01 18:59:17.000000000 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2014, 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 @@ -26,121 +26,102 @@ package javax.sound.sampled; /** - * {@link Line Lines} often have a set of controls, such as gain and pan, that affect - * the audio signal passing through the line. Java Sound's Line objects - * let you obtain a particular control object by passing its class as the - * argument to a {@link Line#getControl(Control.Type) getControl} method. + * {@link Line Lines} often have a set of controls, such as gain and pan, that + * affect the audio signal passing through the line. Java Sound's {@code Line} + * objects let you obtain a particular control object by passing its class as + * the argument to a {@link Line#getControl(Control.Type) getControl} method. *

* Because the various types of controls have different purposes and features, - * all of their functionality is accessed from the subclasses that define - * each kind of control. + * all of their functionality is accessed from the subclasses that define each + * kind of control. * * @author Kara Kytle - * * @see Line#getControls * @see Line#isControlSupported * @since 1.3 */ public abstract class Control { - - // INSTANCE VARIABLES - /** * The control type. */ private final Type type; - - - // CONSTRUCTORS - /** * Constructs a Control with the specified type. - * @param type the kind of control desired + * + * @param type the kind of control desired */ protected Control(Type type) { this.type = type; } - - // METHODS - /** * Obtains the control's type. - * @return the control's type. + * + * @return the control's type */ public Type getType() { return type; } - - // ABSTRACT METHODS - /** * Obtains a String describing the control type and its current state. - * @return a String representation of the Control. + * + * @return a String representation of the Control */ + @Override public String toString() { return new String(getType() + " Control"); } - /** - * An instance of the Type class represents the type of - * the control. Static instances are provided for the - * common types. + * An instance of the {@code Type} class represents the type of the control. + * Static instances are provided for the common types. */ public static class Type { - // CONTROL TYPE DEFINES - - // INSTANCE VARIABLES - /** * Type name. */ private String name; - - // CONSTRUCTOR - /** - * Constructs a new control type with the name specified. - * The name should be a descriptive string appropriate for - * labelling the control in an application, such as "Gain" or "Balance." - * @param name the name of the new control type. + * Constructs a new control type with the name specified. The name + * should be a descriptive string appropriate for labelling the control + * in an application, such as "Gain" or "Balance". + * + * @param name the name of the new control type */ protected Type(String name) { this.name = name; } - - // METHODS - /** - * Finalizes the equals method + * Finalizes the equals method. */ + @Override public final boolean equals(Object obj) { return super.equals(obj); } /** - * Finalizes the hashCode method + * Finalizes the hashCode method. */ + @Override public final int hashCode() { return super.hashCode(); } /** - * Provides the String representation of the control type. This String is - * the same name that was passed to the constructor. + * 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; } - } // class Type - -} // class Control + } +}