{@inheritDoc} Kommentare entfernt

Javadoc Kommentare, die nur {@inheritDoc} enthalten, sind redundant und wurden entfernt.
This commit is contained in:
ngb 2022-12-10 11:06:51 +01:00
parent 8898d6e8ee
commit 20772da813
8 changed files with 16 additions and 183 deletions

View File

@ -1,6 +1,9 @@
package schule.ngb.zm;
import java.awt.*;
import java.awt.Graphics2D;
import java.awt.MultipleGradientPaint;
import java.awt.Paint;
import java.awt.Stroke;
/**
* Basisimplementierung der {@link Strokeable} und {@link Fillable} APIs.
@ -90,9 +93,6 @@ public abstract class BasicDrawable extends Constants implements Strokeable, Fil
// Implementierung Fillable Interface
/**
* {@inheritDoc}
*/
@Override
public void setFill( Paint fill ) {
if( fill == null ) {
@ -106,9 +106,6 @@ public abstract class BasicDrawable extends Constants implements Strokeable, Fil
}
}
/**
* {@inheritDoc}
*/
@Override
public Paint getFill() {
if( fill != null ) {
@ -120,42 +117,27 @@ public abstract class BasicDrawable extends Constants implements Strokeable, Fil
}
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasFillColor() {
return fillColor != null;
}
/**
* {@inheritDoc}
*/
@Override
public boolean hasGradient() {
return fill != null;
}
/**
* {@inheritDoc}
*/
@Override
public Color getFillColor() {
return fillColor;
}
/**
* {@inheritDoc}
*/
@Override
public void setFillColor( Color color ) {
fillColor = color;
fill = null;
}
/**
* {@inheritDoc}
*/
@Override
public MultipleGradientPaint getGradient() {
return fill;
@ -164,17 +146,11 @@ public abstract class BasicDrawable extends Constants implements Strokeable, Fil
// Implementierung Strokeable Interface
/**
* {@inheritDoc}
*/
@Override
public void setStroke( Stroke stroke ) {
this.stroke = stroke;
}
/**
* {@inheritDoc}
*/
@Override
public Stroke getStroke() {
if( stroke == null ) {
@ -183,50 +159,32 @@ public abstract class BasicDrawable extends Constants implements Strokeable, Fil
return stroke;
}
/**
* {@inheritDoc}
*/
@Override
public Color getStrokeColor() {
return strokeColor;
}
/**
* {@inheritDoc}
*/
@Override
public void setStrokeColor( Color color ) {
strokeColor = color;
}
/**
* {@inheritDoc}
*/
@Override
public double getStrokeWeight() {
return strokeWeight;
}
/**
* {@inheritDoc}
*/
@Override
public void setStrokeWeight( double weight ) {
strokeWeight = weight;
this.stroke = null;
}
/**
* {@inheritDoc}
*/
@Override
public Options.StrokeType getStrokeType() {
return strokeType;
}
/**
* {@inheritDoc}
*/
@Override
public void setStrokeType( Options.StrokeType type ) {
strokeType = type;

View File

@ -57,9 +57,6 @@ public class ColorLayer extends Layer {
clear();
}
/**
* {@inheritDoc}
*/
@Override
public void setSize( int width, int height ) {
super.setSize(width, height);

View File

@ -87,9 +87,6 @@ public class DrawableLayer extends Layer {
this.clearBeforeDraw = pClearBeforeDraw;
}
/**
* {@inheritDoc}
*/
@Override
public void draw( Graphics2D graphics ) {
if( clearBeforeDraw ) {

View File

@ -1,10 +1,7 @@
package schule.ngb.zm.layers;
import schule.ngb.zm.Color;
import schule.ngb.zm.Layer;
import schule.ngb.zm.Options;
import schule.ngb.zm.Fillable;
import schule.ngb.zm.Strokeable;
import schule.ngb.zm.*;
import schule.ngb.zm.shapes.Text;
import schule.ngb.zm.util.io.ImageLoader;
@ -418,9 +415,6 @@ public class DrawingLayer extends Layer implements Strokeable, Fillable {
shapeDelegate.setStrokeType(type);
}
/**
* {@inheritDoc}
*/
@Override
public Stroke getStroke() {
return shapeDelegate.getStroke();
@ -976,7 +970,7 @@ public class DrawingLayer extends Layer implements Strokeable, Fillable {
}
/**
* Zeichnet das Bild von der angegbenen Quelle an den angegebenen
* Zeichnet das Bild von der angegebenen Quelle an den angegebenen
* Koordinaten auf die Zeichenebene. Das Bild wird um den angegebenen Faktor
* skaliert.
* <p>
@ -994,7 +988,7 @@ public class DrawingLayer extends Layer implements Strokeable, Fillable {
}
/**
* Zeichnet das Bild von der angegbenen Quelle an den angegebenen
* Zeichnet das Bild von der angegebenen Quelle an den angegebenen
* Koordinaten auf die Zeichenebene. Das Bild wird um den angegebenen Faktor
* skaliert und der angegebene Ankerpunkt verwendet.
* <p>

View File

@ -98,50 +98,32 @@ public class Mixer implements Audio, AudioListener {
audios.clear();
}
/**
* {@inheritDoc}
*/
@Override
public boolean isPlaying() {
return audios.stream().anyMatch(aw -> aw.audio.isPlaying());
}
/**
* {@inheritDoc}
*/
@Override
public boolean isLooping() {
return audios.stream().anyMatch(aw -> aw.audio.isLooping());
}
/**
* {@inheritDoc}
*/
@Override
public void setVolume( double pVolume ) {
volume = (float) pVolume;
audios.stream().forEach(aw -> aw.audio.setVolume(aw.volumeFactor * pVolume));
public void setVolume( double volume ) {
this.volume = volume < 0 ? 0f : (float) volume;
audios.stream().forEach(aw -> aw.audio.setVolume(aw.volumeFactor * volume));
}
/**
* {@inheritDoc}
*/
@Override
public double getVolume() {
return volume;
}
/**
* {@inheritDoc}
*/
@Override
public void play() {
audios.stream().forEach(aw -> aw.audio.play());
}
/**
* {@inheritDoc}
*/
@Override
public void playAndWait() {
audios.stream().forEach(aw -> aw.audio.play());
@ -154,25 +136,16 @@ public class Mixer implements Audio, AudioListener {
}
}
/**
* {@inheritDoc}
*/
@Override
public void loop() {
audios.stream().forEach(aw -> aw.audio.loop());
}
/**
* {@inheritDoc}
*/
@Override
public void stop() {
audios.stream().forEach(aw -> aw.audio.stop());
}
/**
* {@inheritDoc}
*/
@Override
public void dispose() {
if( isPlaying() ) {
@ -243,7 +216,8 @@ public class Mixer implements Audio, AudioListener {
/**
* Interne Methode, um den Listener-Mechanismus zu initialisieren. Wird erst
* aufgerufen, soblad sich auch ein Listener registrieren möchte.
* aufgerufen, sobald sich auch ein Listener registrieren möchte.
*
* @return
*/
private EventDispatcher<Audio, AudioListener> initializeEventDispatcher() {

View File

@ -93,32 +93,20 @@ public final class DoubleMatrix implements MLMatrix {
rows * columns);
}
/**
* {@inheritDoc}
*/
@Override
public int columns() {
return columns;
}
/**
* {@inheritDoc}
*/
@Override
public int rows() {
return rows;
}
/**
* {@inheritDoc}
*/
int idx( int r, int c ) {
return c * rows + r;
}
/**
* {@inheritDoc}
*/
@Override
public double get( int row, int col ) {
try {
@ -128,9 +116,6 @@ public final class DoubleMatrix implements MLMatrix {
}
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix set( int row, int col, double value ) {
try {
@ -141,52 +126,34 @@ public final class DoubleMatrix implements MLMatrix {
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix initializeRandom() {
return initializeRandom(-1.0, 1.0);
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix initializeRandom( double lower, double upper ) {
applyInPlace(( d ) -> ((upper - lower) * Constants.random()) + lower);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix initializeOne() {
applyInPlace(( d ) -> 1.0);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix initializeZero() {
applyInPlace(( d ) -> 0.0);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix duplicate() {
return new DoubleMatrix(this);
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix multiplyTransposed( MLMatrix B ) {
/*return new DoubleMatrix(IntStream.range(0, rows).parallel().mapToObj(
@ -208,9 +175,6 @@ public final class DoubleMatrix implements MLMatrix {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix multiplyAddBias( final MLMatrix B, final MLMatrix C ) {
/*return new DoubleMatrix(IntStream.range(0, rows).parallel().mapToObj(
@ -233,9 +197,6 @@ public final class DoubleMatrix implements MLMatrix {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix transposedMultiplyAndScale( final MLMatrix B, final double scalar ) {
/*return new DoubleMatrix(IntStream.range(0, columns).parallel().mapToObj(
@ -258,9 +219,6 @@ public final class DoubleMatrix implements MLMatrix {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix add( MLMatrix B ) {
/*return new DoubleMatrix(IntStream.range(0, rows).parallel().mapToObj(
@ -277,9 +235,6 @@ public final class DoubleMatrix implements MLMatrix {
return sum;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix addInPlace( MLMatrix B ) {
for( int j = 0; j < columns; j++ ) {
@ -290,9 +245,6 @@ public final class DoubleMatrix implements MLMatrix {
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix sub( MLMatrix B ) {
/*return new DoubleMatrix(IntStream.range(0, rows).parallel().mapToObj(
@ -309,9 +261,6 @@ public final class DoubleMatrix implements MLMatrix {
return diff;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix colSums() {
/*DoubleMatrix colSums = new DoubleMatrix(1, columns);
@ -331,9 +280,6 @@ public final class DoubleMatrix implements MLMatrix {
return colSums;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix scaleInPlace( final double scalar ) {
for( int i = 0; i < coefficients.length; i++ ) {
@ -342,9 +288,6 @@ public final class DoubleMatrix implements MLMatrix {
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix scaleInPlace( final MLMatrix S ) {
for( int j = 0; j < columns; j++ ) {
@ -355,9 +298,6 @@ public final class DoubleMatrix implements MLMatrix {
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix apply( DoubleUnaryOperator op ) {
DoubleMatrix result = new DoubleMatrix(rows, columns);
@ -367,9 +307,6 @@ public final class DoubleMatrix implements MLMatrix {
return result;
}
/**
* {@inheritDoc}
*/
@Override
public MLMatrix applyInPlace( DoubleUnaryOperator op ) {
for( int i = 0; i < coefficients.length; i++ ) {

View File

@ -1,6 +1,9 @@
package schule.ngb.zm.shapes;
import schule.ngb.zm.*;
import schule.ngb.zm.BasicDrawable;
import schule.ngb.zm.Fillable;
import schule.ngb.zm.Options;
import schule.ngb.zm.Strokeable;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
@ -142,9 +145,6 @@ public abstract class Shape extends BasicDrawable {
*/
public abstract double getHeight();
/**
* {@inheritDoc}
*/
@Override
public void setGradient( schule.ngb.zm.Color from, schule.ngb.zm.Color to, Options.Direction dir ) {
Point2D apDir = getAbsAnchorPoint(dir);
@ -152,9 +152,6 @@ public abstract class Shape extends BasicDrawable {
setGradient(apInv.getX(), apInv.getY(), from, apDir.getX(), apDir.getY(), to);
}
/**
* {@inheritDoc}
*/
@Override
public void setGradient( schule.ngb.zm.Color from, schule.ngb.zm.Color to ) {
Point2D ap = getAbsAnchorPoint(CENTER);

View File

@ -136,57 +136,36 @@ public class BasicChartValue implements ChartValue {
this.color = color;
}
/**
* {@inheritDoc}
*/
@Override
public double getX() {
return xValue;
}
/**
* {@inheritDoc}
*/
@Override
public double getValue() {
return value;
}
/**
* {@inheritDoc}
*/
@Override
public void setValue( double pValue ) {
this.value = pValue;
}
/**
* {@inheritDoc}
*/
@Override
public String getLabel() {
return label;
}
/**
* {@inheritDoc}
*/
@Override
public void setLabel( String pLabel ) {
this.label = pLabel;
}
/**
* {@inheritDoc}
*/
@Override
public Color getColor() {
return color;
}
/**
* {@inheritDoc}
*/
@Override
public void setColor( Color pColor ) {
this.color = pColor;