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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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