add override to java native pojo (#15125)

This commit is contained in:
William Cheng
2023-04-06 15:00:14 +08:00
committed by GitHub
parent 07227d4650
commit ba2c42e34b
9 changed files with 118 additions and 1 deletions

View File

@@ -78,6 +78,18 @@ public class Cat extends Animal {
}
@Override
public Cat className(String className) {
this.setClassName(className);
return this;
}
@Override
public Cat color(String color) {
this.setColor(color);
return this;
}
/**
* Return true if this Cat object is equal to o.
*/

View File

@@ -78,6 +78,18 @@ public class Dog extends Animal {
}
@Override
public Dog className(String className) {
this.setClassName(className);
return this;
}
@Override
public Dog color(String color) {
this.setColor(color);
return this;
}
/**
* Return true if this Dog object is equal to o.
*/

View File

@@ -52,6 +52,12 @@ public class ParentPet extends GrandparentAnimal {
public ParentPet() {
}
@Override
public ParentPet petType(String petType) {
this.setPetType(petType);
return this;
}
/**
* Return true if this ParentPet object is equal to o.
*/