🅵
Остальные сделают форк и под шаманят, ну или @override
Size: a a a
🅵
M
M
🅵
M
🅵
🅵
M
🅵
class GavnoInt {Хотите такой полезный класс калькулятора?
int get value => this._value;
final int _value;
GavnoInt(int value)
: assert(value != null && value is int && value >= 0)
, this._value = value;
operator +(GavnoInt obj)
=> GavnoInt(this._value + obj.value);
@override
String toString() => this._value.toString();
@override
int get hashCode => this._value;
operator ==(Object obj) => obj is GavnoInt ? this.hashCode == obj.hashCode : false;
}
abstract class Calculator {
static GavnoInt sum(GavnoInt a, GavnoInt b)
=> a + b;
}
K
class GavnoInt {Хотите такой полезный класс калькулятора?
int get value => this._value;
final int _value;
GavnoInt(int value)
: assert(value != null && value is int && value >= 0)
, this._value = value;
operator +(GavnoInt obj)
=> GavnoInt(this._value + obj.value);
@override
String toString() => this._value.toString();
@override
int get hashCode => this._value;
operator ==(Object obj) => obj is GavnoInt ? this.hashCode == obj.hashCode : false;
}
abstract class Calculator {
static GavnoInt sum(GavnoInt a, GavnoInt b)
=> a + b;
}
🅵
🅵
M
class GavnoInt {Хотите такой полезный класс калькулятора?
int get value => this._value;
final int _value;
GavnoInt(int value)
: assert(value != null && value is int && value >= 0)
, this._value = value;
operator +(GavnoInt obj)
=> GavnoInt(this._value + obj.value);
@override
String toString() => this._value.toString();
@override
int get hashCode => this._value;
operator ==(Object obj) => obj is GavnoInt ? this.hashCode == obj.hashCode : false;
}
abstract class Calculator {
static GavnoInt sum(GavnoInt a, GavnoInt b)
=> a + b;
}
K
class GavnoInt {Хотите такой полезный класс калькулятора?
int get value => this._value;
final int _value;
GavnoInt(int value)
: assert(value != null && value is int && value >= 0)
, this._value = value;
operator +(GavnoInt obj)
=> GavnoInt(this._value + obj.value);
@override
String toString() => this._value.toString();
@override
int get hashCode => this._value;
operator ==(Object obj) => obj is GavnoInt ? this.hashCode == obj.hashCode : false;
}
abstract class Calculator {
static GavnoInt sum(GavnoInt a, GavnoInt b)
=> a + b;
}
🅵
🅵
🅵
_GavnoInt
, а отдавать вам int🅵
🅵
🅵