Removed AvoidStarImport Rule

Added JavaDocType Rule
This commit is contained in:
Mudit Porwal
2017-03-22 01:16:01 +08:00
parent 175e9f58c1
commit 09585c3874
105 changed files with 577 additions and 284 deletions

View File

@ -21,6 +21,9 @@ package com.iluwatar.datamapper;
import java.io.Serializable;
/**
* Class defining Student
*/
public final class Student implements Serializable {
private static final long serialVersionUID = 1L;
@ -32,7 +35,7 @@ public final class Student implements Serializable {
/**
* Use this constructor to create a Student with all details
*
*
* @param studentId as unique student id
* @param name as student name
* @param grade as respective grade of student
@ -46,7 +49,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @return the student id
*/
public int getStudentId() {
@ -54,7 +57,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @param studentId as unique student id
*/
public void setStudentId(final int studentId) {
@ -62,7 +65,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @return name of student
*/
public String getName() {
@ -70,7 +73,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @param name as 'name' of student
*/
public void setName(final String name) {
@ -78,7 +81,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @return grade of student
*/
public char getGrade() {
@ -86,7 +89,7 @@ public final class Student implements Serializable {
}
/**
*
*
* @param grade as 'grade of student'
*/
public void setGrade(final char grade) {
@ -94,7 +97,7 @@ public final class Student implements Serializable {
}
/**
*
*
*/
@Override
public boolean equals(final Object inputObject) {
@ -120,7 +123,7 @@ public final class Student implements Serializable {
}
/**
*
*
*/
@Override
public int hashCode() {
@ -130,7 +133,7 @@ public final class Student implements Serializable {
}
/**
*
*
*/
@Override
public String toString() {

View File

@ -20,6 +20,9 @@ package com.iluwatar.datamapper;
import java.util.Optional;
/**
* Interface lists out the possible behaviour for all possible student mappers
*/
public interface StudentDataMapper {
Optional<Student> find(int studentId);

View File

@ -22,6 +22,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* Implementation of Actions on Students Data
*/
public final class StudentDataMapperImpl implements StudentDataMapper {
/* Note: Normally this would be in the form of an actual database */

View File

@ -18,17 +18,21 @@
*/
package com.iluwatar.datamapper;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Tests {@link Student}.
*/
public final class StudentTest {
@Test
/**
* This API tests the equality behaviour of Student object
* Object Equality should work as per logic defined in equals method
*
*
* @throws Exception if any execution error during test
*/
public void testEquality() throws Exception {