| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
package org.kuali.student.contract.model.test.source; |
| 10 |
|
|
| 11 |
|
import java.io.Serializable; |
| 12 |
|
import java.util.ArrayList; |
| 13 |
|
import java.util.List; |
| 14 |
|
|
| 15 |
|
import javax.xml.bind.annotation.XmlElement; |
| 16 |
|
import javax.xml.bind.annotation.XmlTransient; |
| 17 |
|
|
| 18 |
|
import org.kuali.student.contract.model.test.source.Attribute; |
| 19 |
|
import org.kuali.student.contract.model.test.source.HasAttributes; |
| 20 |
|
|
| 21 |
|
@SuppressWarnings("serial") |
| 22 |
|
@XmlTransient |
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 3 |
Complexity Density: 0.33 |
|
| 23 |
|
public abstract class HasAttributesInfo implements HasAttributes, Serializable { |
| 24 |
|
|
| 25 |
|
@XmlElement |
| 26 |
|
protected final List<AttributeInfo> attributes; |
| 27 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 28 |
0
|
protected HasAttributesInfo() {... |
| 29 |
0
|
attributes = null; |
| 30 |
|
} |
| 31 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 32 |
0
|
protected HasAttributesInfo(HasAttributes builder) {... |
| 33 |
0
|
attributes = new ArrayList<AttributeInfo>(); |
| 34 |
|
|
| 35 |
0
|
AttributeInfo.Builder attBuilder = new AttributeInfo.Builder(); |
| 36 |
0
|
for (Attribute att : builder.getAttributes()) { |
| 37 |
0
|
attBuilder.setKey(att.getKey()); |
| 38 |
0
|
attBuilder.setValue(att.getValue()); |
| 39 |
0
|
attBuilder.setId(att.getId()); |
| 40 |
0
|
attributes.add(attBuilder.build()); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
@return |
| 46 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 47 |
0
|
@Override... |
| 48 |
|
public List<AttributeInfo> getAttributes() { |
| 49 |
0
|
return attributes; |
| 50 |
|
} |
| 51 |
|
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 4 |
Complexity Density: 1.33 |
|
| 52 |
|
public static class Builder implements HasAttributes { |
| 53 |
|
private List<? extends Attribute> attributes = new ArrayList<AttributeInfo>(); |
| 54 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 55 |
0
|
public Builder() {}... |
| 56 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 57 |
0
|
public Builder(HasAttributes hasAtts) {... |
| 58 |
0
|
this.attributes = hasAtts.getAttributes(); |
| 59 |
|
} |
| 60 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 61 |
0
|
@Override... |
| 62 |
|
public List<? extends Attribute> getAttributes() { |
| 63 |
0
|
return attributes; |
| 64 |
|
} |
| 65 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
0
|
public void setAttributes(List<? extends Attribute> attributes) {... |
| 67 |
0
|
this.attributes = attributes; |
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
} |