-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEncodingData.java
89 lines (77 loc) · 1.56 KB
/
EncodingData.java
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
* The Class EncodingData.
*
* @author Toni Lachmaniucu Date: April 2 2018
*/
public class EncodingData {
/** The symbol. */
private char symbol;
/** The encoding. */
private String encoding;
/**
* Instantiates a new encoding data object.
*
* @param symbol
* the symbol of the character
* @param encoding
* the encoding of the character
*/
public EncodingData(char symbol, String encoding) {
this.symbol = symbol;
this.encoding = encoding;
}
/**
* Gets the symbol.
*
* @return the symbol
*/
public char getSymbol() {
return symbol;
}
/**
* Sets the symbol.
*
* @param symbol
* the new symbol
*/
public void setSymbol(char symbol) {
this.symbol = symbol;
}
/**
* Gets the encoding.
*
* @return the encoding
*/
public String getEncoding() {
return encoding;
}
/**
* Sets the encoding.
*
* @param encoding
* the new encoding
*/
public void setEncoding(String encoding) {
this.encoding = encoding;
}
/*
* @param obj checks to see if the symbols of the two objects are the same
*
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
EncodingData other = (EncodingData) obj;
if (this.symbol != other.symbol)
return false;
return true;
}
/*
* Generates a string representaion of the encoding data object including the
* symbol and the encoding
*
* @see java.lang.Object#toString()
*/
public String toString() {
return "Symbol:" + this.symbol + " ," + "Encoding:" + this.encoding;
}
}