class GeoJSON::Coordinates::CoordinateTree::Leaf
Overview
A CoordinateTree::Leaf
is a terminal node in a CoordinateTree
structure. It has a parent and a leaf value but no children.
Defined in:
geojson/coordinates/coordinate_tree.crConstructors
- .new(parent : CoordinateTree, leaf_value : Number)
-
.new(parent : CoordinateTree, parser : JSON::PullParser)
Creates a new
Leaf
as a child of parent based on parser.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#each(&block : CoordinateTree -> _)
Raises an exception because a Leaf has no children to enumerate upon.
-
#hash(hasher)
See
Object#hash(hasher)
-
#leaf_value : Float64
The Float64 value at this Leaf
-
#leaf_value=(leaf_value : Float64)
The Float64 value at this Leaf
Instance methods inherited from class GeoJSON::Coordinates::CoordinateTree
leaf_value : Float64
leaf_value
Constructor methods inherited from class GeoJSON::Coordinates::CoordinateTree
new(parser : JSON::PullParser)
new
Constructor Detail
Creates a new Leaf
with the given parent and leaf_value and adds
the new Branch
as a child of parent.
Creates a new Leaf
as a child of parent based on parser. This
constructor assumes that the parser is positioned at the beginning of
a position array in a GeoJSON coordinate string.
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Raises an exception because a Leaf has no children to enumerate upon.