# AbstractEdge | data-structure-typed
Documentation for data-structure-typed

# Class AbstractEdge<T>`Abstract`

#### Type Parameters

- #### T = any

#### Hierarchy

- AbstractEdge
  - DirectedEdge
  - UndirectedEdge

- Defined in src/data-structures/graph/abstract-graph.ts:47

#####
Index

### Constructors

constructor

### Properties

_hashCode
_val
_weight

### Accessors

hashCode
val
weight

### Methods

_setHashCode

## Constructors

### `Protected` constructor

- new AbstractEdge<T>(weight?, val?): AbstractEdge <T>

- The above function is a protected constructor that initializes the weight, value, and hash code properties of an object.

  #### Type Parameters

  - #### T = any

  #### Parameters

  - ##### `Optional` weight: number

    The `weight` parameter is an optional number that represents the weight of the object. If a value is provided, it will be assigned to the `_weight` property. If no value is provided, the default value of 1 will be assigned.

  - ##### `Optional` val: T

    The `val` parameter is of type `T`, which means it can be any type. It is an optional parameter, meaning it can be omitted when creating an instance of the class.

  #### Returns AbstractEdge <T>

  - Defined in src/data-structures/graph/abstract-graph.ts:57

## Properties

### `Protected` _hashCode

_hashCode: string

- Defined in src/data-structures/graph/abstract-graph.ts:83

### `Private` _val

_val: undefined | T

- Defined in src/data-structures/graph/abstract-graph.ts:63

### `Private` _weight

_weight: number

- Defined in src/data-structures/graph/abstract-graph.ts:73

## Accessors

### hashCode

- get hashCode(): string

- #### Returns string

  - Defined in src/data-structures/graph/abstract-graph.ts:85

### val

- get val(): undefined | T

- #### Returns undefined | T

  - Defined in src/data-structures/graph/abstract-graph.ts:65
- set val(value): void

- #### Parameters

  - ##### value: undefined | T

  #### Returns void

  - Defined in src/data-structures/graph/abstract-graph.ts:69

### weight

- get weight(): number

- #### Returns number

  - Defined in src/data-structures/graph/abstract-graph.ts:75
- set weight(v): void

- #### Parameters

  - ##### v: number

  #### Returns void

  - Defined in src/data-structures/graph/abstract-graph.ts:79

## Methods

### `Protected` _setHashCode

- _setHashCode(v): void

- The function sets the value of the _hashCode property to the provided string.

  #### Parameters

  - ##### v: string

    The parameter "v" is of type string and represents the value that will be assigned to the "_hashCode" property.

  #### Returns void

  - Defined in src/data-structures/graph/abstract-graph.ts:99

Generated using TypeDoc