# `RDF.BlankNode`
[🔗](https://github.com/rdf-elixir/rdf-ex/blob/v3.0.1/lib/rdf/model/blank_node.ex#L1)

An RDF blank node (aka bnode) is a local node of a graph without an IRI.

This module can also be used as `RDF.Resource.Generator` for the generation
of random identifiers, which is using the `new/0` function.
For the generation of value-based blank nodes, you can use `RDF.BlankNode.Generator`.

see <https://www.w3.org/TR/rdf11-primer/#section-blank-node>
and <https://www.w3.org/TR/rdf11-concepts/#section-blank-nodes>

# `t`

```elixir
@type t() :: %RDF.BlankNode{value: String.t()}
```

# `equal_value?`

```elixir
@spec equal_value?(t(), t()) :: boolean() | nil
```

Tests for value equality of blank nodes.

Returns `nil` when the given arguments are not comparable as blank nodes.

# `new`

```elixir
@spec new() :: t()
```

Creates a random `RDF.BlankNode`.

# `new`

```elixir
@spec new(reference() | String.t() | atom() | integer()) :: t()
```

Creates a `RDF.BlankNode` with a user-defined value for its identity.

A `"_:"` prefix in a given string `value` will be automatically ignored.

When given an integer as `value` it will be automatically converted to a
string prefixed with `"b"`.

## Examples

    iex> RDF.BlankNode.new(:foo)
    %RDF.BlankNode{value: "foo"}

    iex> RDF.BlankNode.new("foo")
    %RDF.BlankNode{value: "foo"}

    iex> RDF.BlankNode.new("_:foo")
    %RDF.BlankNode{value: "foo"}

    iex> RDF.BlankNode.new(42)
    %RDF.BlankNode{value: "b42"}

# `value`

Returns the internal string representation of a blank node.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
