aboutsummaryrefslogtreecommitdiff
path: root/test/org/gnunet/construct/StringTuple.java
blob: 085b7a918b815d9db845ec64bbd9b845b9c3b448 (plain) (blame)
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
package org.gnunet.construct;

/**
* ...
*
* @author Florian Dold
*/
public class StringTuple implements Message {
    @ZeroTerminatedString
    public String str1;
    @ZeroTerminatedString
    public String str2;

    public StringTuple() {
        // empty default ctor needed by Construct
    }
    public StringTuple(String str1, String str2) {
        this.str1 = str1;
        this.str2 = str2;
    }
    @Override
    public boolean equals(Object other) {
        if (!(other instanceof StringTuple)) {
            return false;
        }
        StringTuple otherT = (StringTuple) other;
        return otherT.str1.equals(this.str1) && otherT.str2.equals(this.str2);
    }
}