Method getStudents
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public StudentSet getStudents(Student... filter) {
StudentSet result = new StudentSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getName
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public StringList getName(String... filter) {
StringList result = new StringList();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getPresident
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public PresidentSet getPresident(President... filter) {
PresidentSet result = new PresidentSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getRooms
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public RoomSet getRooms(Room... filter) {
RoomSet result = new RoomSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getPresident
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public PresidentSet getPresident(President... filter) {
PresidentSet result = new PresidentSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
Method getRooms
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public RoomSet getRooms(Room... filter) {
RoomSet result = new RoomSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
Method getStudents
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public StudentSet getStudents(Student... filter) {
StudentSet result = new StudentSet();
if(listener != null) {
result.withListener(listener);
University[] children = this.toArray(new University[size()]);
Method setValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean setValue(Object entity, String attribute, Object value, String type) {
if(attribute == null || entity instanceof University == false) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return element.getName();
Avoid too many return
statements within this method. Open
return element.setName((String) value);
Method getValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Object getValue(Object entity, String attribute) {
if(attribute == null || entity instanceof University == false) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"