English Reference
Noun

setter

n.
B2 Upper Intermediate US /ˈsɛtɝ/ UK /sˈɛtɐ/ set·ter UK spelling setter's, setter's Programming Sports

n.A special piece of code used to change or update information stored inside an object. It helps keep the data safe by controlling how that change happens.

n.In object-oriented programming, a setter is a public method used to assign or update the value of a private member variable. It provides encapsulation by allowing the class to validate data or perform logic before the internal state is modified. This is distinct from the common sense of a person who sets things or a breed of dog.


SIMPLE

You should use a setter to update the user's age safely.

CONTEXTUAL

The programmer wrote a setter for the price property to ensure no negative numbers were entered.

COMPLEX

By using a setter instead of making the variable public, the application can automatically trigger a screen refresh whenever the data changes.

Usage

In a sports context, it refers to a specific position; in a hobby context, it often refers to the author of a puzzle.

This entry
Level B2 · Upper Intermediate
Frequency Occasional
Updated