-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFactor.java
More file actions
53 lines (47 loc) · 1.37 KB
/
Copy pathFactor.java
File metadata and controls
53 lines (47 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* A decision-making factor (characteristic).
* Implements Serializable to facilitate saving and restoring
* collections of Factor objects.
* @author Dr. Jody Paul
* @version 20241113.3
*/
public class Factor implements java.io.Serializable {
/** Serialization identifier. */
private static final long serialVersionUID = 202411130601L;
/** The default ranking of a Factor. */
public static final int DEFAULT_RANK = 1;
/** The descriptive name of this factor. */
private String name;
/** The relative ranking of importance of this factor. */
private int rank;
/**
* Constructor that establishes the factor's name
* and sets the ranking to the default.
* @param theName the name of this factor
*/
public Factor(final String theName) {
this.name = theName;
this.rank = DEFAULT_RANK;
}
/**
* Modify the ranking of this factor.
* @param newRank the new value for ranking
*/
public void setRank(final int newRank) {
this.rank = newRank;
}
/**
* Access the name of this factor.
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Access the rank of this alternative.
* @return the ranking
*/
public int getRank() {
return this.rank;
}
}