# BaseHelper

`com.jsmacrosce.jsmacros.core.helpers.BaseHelper`

Base class for helpers that wrap a raw value; it is abstract and is not a standalone script global.  
```js
const text = Chat.createTextHelperFromString("hello");  
const component = text.getRaw();  
```

## Type Parameters

- `T`: type of the wrapped value

## Constructors

### new BaseHelper {#com.jsmacrosce.jsmacros.core.helpers.BaseHelper_constructor-T-}

```js
new BaseHelper(T base)
```

Stores the supplied value without validation; `null` is retained as-is.

**Parameters:**
- `base`: value to wrap

## Methods

### equals {#com.jsmacrosce.jsmacros.core.helpers.BaseHelper_equals-Object-}

```js
equals(Object obj): boolean
```

Compares wrapped values when `obj` is a `BaseHelper`; otherwise compares the wrapped value directly with `obj`.  
 This delegates to the stored value's `equals` and throws [NullPointerException](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html) if that value is `null`.

**Parameters:**
- `obj`: object to compare

**Returns:** whether the delegated comparison reports equality

### getRaw {#com.jsmacrosce.jsmacros.core.helpers.BaseHelper_getRaw-}

```js
getRaw(): T
```

Returns the wrapped value, which may be `null`.

**Returns:** the stored value

### hashCode {#com.jsmacrosce.jsmacros.core.helpers.BaseHelper_hashCode-}

```js
hashCode(): int
```

Returns the wrapped value's hash code; throws [NullPointerException](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NullPointerException.html) if it is `null`.

**Returns:** the raw value's hash code
