1 /*
2  * hunt-console eases the creation of beautiful and testable command line interfaces.
3  *
4  * Copyright (C) 2018-2019, HuntLabs
5  *
6  * Website: https://www.huntlabs.net
7  *
8  * Licensed under the Apache-2.0 License.
9  *
10  */
11  
12 module hunt.console.formatter.OutputFormatterOption;
13 
14 class OutputFormatterOption
15 {
16     private int set;
17 
18     private int unset;
19 
20     public this(int set, int unset)
21     {
22         this.set = set;
23         this.unset = unset;
24     }
25 
26     public int getSet()
27     {
28         return set;
29     }
30 
31     public int getUnset()
32     {
33         return unset;
34     }
35 
36     override public bool opEquals(Object o)
37     {
38         if (this is o) return true;
39         if (!(cast(OutputFormatterOption)o !is null)) return false;
40 
41         OutputFormatterOption that = cast(OutputFormatterOption) o;
42 
43         if (set != that.set) return false;
44         if (unset != that.unset) return false;
45 
46         return true;
47     }
48 
49     override public size_t toHash() @trusted nothrow
50     {
51         int result = set;
52         result = 31 * result + unset;
53         return result;
54     }
55 }