public equals(o: any): boolean {
        if (!(o instanceof Mode)) {
            return false;
        }
        const other = <Mode>o;