Add Type to Ruby!
This project is maintained by S-H-GAMELINKS
Tatara::FloatStringMap is Map class like static type programming lang.
Tatara::FloatStringMap used by Float key, and String value.
But, you can use Integer for key.
@f = Tatara::FloatStringMap.new
@f[0.5] = "42"
# => Key: 0.5, Value: "42"
@f[10] = "8"
# => Key: 10.0, Value: "8"
But, can not set Integer & Float for value.
@f = Tatara::FloatStringMap.new
@f[0.5] = 42
# => Error!
Create new Tatara::FloatStringMap instance.
@f = Tatara::FloatStringMap.new
Access by key.
@f = Tatara::FloatStringMap.new
@f[0.5] = "42"
puts @i[0.5]
# => "42"
Set value by key.
@f = Tatara::FloatStringMap.new
@f[0.5] = "42"
# => Set value is "42"
Set key & value.
@s = Tatara::FloatFloatMap.new
@s.insert(0.5, "42")
# => Set value is "42".