Object - (Mutator|Setter|Set) method

Card Puncher Data Processing

Object - (Mutator|Setter|Set) method

About

Mutators are methods. Their role are to set the values of an object's state

The usages are:

  • central point of control for the input in order to reject bad data
  • change detection (if the value is not the same, a change has occurred and can be reported)

If the setter are private, the object is said to be immutable.

The Get method is the accessor while the Set method is known as the mutator method. See State - Mutable

Library





Discover More
Card Puncher Data Processing
Design Pattern - Dependency Injection

Dependency injection is: a dependency resolution mechanism where components (object, bean, client) are given their (type) dependencies (service, ..) (Dependencies are injected) and therefore are...
Fitnesse Architecture
Fitnesse - Getting Started

A little getting started guide for fitness Slim has several test written in table format. We will use the decision table where eg specifies a Java package (or other language namespace),...
Fitnesse Architecture
Fitnesse - Test Table

A table (test table) is the basic statement of Fitnesse in order to defined test. The format is table dependent but they generally take the basic form of: a constructor row (that defines the test...
Java Conceptuel Diagram
Java Concurrency - Immutable Object

Immutable object in Java Concurrency. Don't provide “setter” methods — methods that modify fields or objects referred to by fields. Make all fields final and private. Don't allow subclasses...
Card Puncher Data Processing
Object - (Accessors|Get|Getter) Methods

Accessors are methods. Their role are to return the values of an object's state (a field in Java, a property in Javascript...) For the same field, you can have several getter: get: to get the value...
Fitnesse Architecture
Slim - Decision Table (test case as a row)

A decision table is a language structure of Fitness that defines tests run and expectation. Similar to Fit Column Fixture See Basic test with a decision table where eg.division is the fixture...
Data System Architecture
State - Immutable

A state who is immutable cannot be changed. An variable (object) is considered immutable if its state cannot change after it is constructed. Immutable objects are particularly useful in concurrent applications....
Data System Architecture
State - Mutable

A state who is mutable can be changed. Mutation happens with mutator method: in CRUD term, they are known as Create, Update, Delete at a object level, they are known as the mutator method (ie set,...



Share this page:
Follow us:
Task Runner