ItemList.java

1
/*******************************************************************************
2
 * Copyhacked (H) 2012-2020.
3
 * This program and the accompanying materials
4
 * are made available under no term at all, use it like
5
 * you want, but share and discuss about it
6
 * every time possible with every body.
7
 * 
8
 * Contributors:
9
 *      ron190 at ymail dot com - initial implementation
10
 ******************************************************************************/
11
package com.jsql.view.swing.list;
12
13
/**
14
 * Basic object to avoid String incompatibility with drag and drop feature.
15
 */
16
public class ItemList {
17
    
18
    /**
19
     * Text displayed on item.
20
     */
21
    private String internalString;
22
    private String originalString;
23
24
    private boolean isVulnerable = false;
25
    private Boolean isDatabaseConfirmed = false;
26
    
27
    /**
28
     * Create a JList item.
29
     * @param newString
30
     */
31
    public ItemList(String newString) {
32
        
33
        this.internalString = newString;
34
        this.originalString = newString;
35
    }
36
    
37
    public void reset() {
38
        
39
        this.internalString = this.originalString;
40
        this.isVulnerable = false;
41
        this.isDatabaseConfirmed = false;
42
    }
43
    
44
    @Override
45
    public String toString() {
46 1 1. toString : replaced return value with "" for com/jsql/view/swing/list/ItemList::toString → NO_COVERAGE
        return this.internalString;
47
    }
48
    
49
    
50
    // Getter and setter
51
52
    public String getInternalString() {
53 1 1. getInternalString : replaced return value with "" for com/jsql/view/swing/list/ItemList::getInternalString → NO_COVERAGE
        return this.internalString;
54
    }
55
56
    public void setInternalString(String internalString) {
57
        this.internalString = internalString;
58
    }
59
60
    public boolean getIsVulnerable() {
61 2 1. getIsVulnerable : replaced boolean return with false for com/jsql/view/swing/list/ItemList::getIsVulnerable → NO_COVERAGE
2. getIsVulnerable : replaced boolean return with true for com/jsql/view/swing/list/ItemList::getIsVulnerable → NO_COVERAGE
        return this.isVulnerable;
62
    }
63
64
    public void setIsVulnerable(boolean isVulnerable) {
65
        this.isVulnerable = isVulnerable;
66
    }
67
68
    public boolean getIsDatabaseConfirmed() {
69 2 1. getIsDatabaseConfirmed : replaced boolean return with true for com/jsql/view/swing/list/ItemList::getIsDatabaseConfirmed → NO_COVERAGE
2. getIsDatabaseConfirmed : replaced boolean return with false for com/jsql/view/swing/list/ItemList::getIsDatabaseConfirmed → NO_COVERAGE
        return this.isDatabaseConfirmed;
70
    }
71
72
    public void setIsDatabaseConfirmed(boolean isDatabaseConfirmed) {
73
        this.isDatabaseConfirmed = isDatabaseConfirmed;
74
    }
75
    
76
    public String getOriginalString() {
77 1 1. getOriginalString : replaced return value with "" for com/jsql/view/swing/list/ItemList::getOriginalString → NO_COVERAGE
        return this.originalString;
78
    }
79
80
    public void setOriginalString(String originalString) {
81
        this.originalString = originalString;
82
    }
83
}

Mutations

46

1.1
Location : toString
Killed by : none
replaced return value with "" for com/jsql/view/swing/list/ItemList::toString → NO_COVERAGE

53

1.1
Location : getInternalString
Killed by : none
replaced return value with "" for com/jsql/view/swing/list/ItemList::getInternalString → NO_COVERAGE

61

1.1
Location : getIsVulnerable
Killed by : none
replaced boolean return with false for com/jsql/view/swing/list/ItemList::getIsVulnerable → NO_COVERAGE

2.2
Location : getIsVulnerable
Killed by : none
replaced boolean return with true for com/jsql/view/swing/list/ItemList::getIsVulnerable → NO_COVERAGE

69

1.1
Location : getIsDatabaseConfirmed
Killed by : none
replaced boolean return with true for com/jsql/view/swing/list/ItemList::getIsDatabaseConfirmed → NO_COVERAGE

2.2
Location : getIsDatabaseConfirmed
Killed by : none
replaced boolean return with false for com/jsql/view/swing/list/ItemList::getIsDatabaseConfirmed → NO_COVERAGE

77

1.1
Location : getOriginalString
Killed by : none
replaced return value with "" for com/jsql/view/swing/list/ItemList::getOriginalString → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1