A hammer device (312, 412) comprising: - a frame (313, 412) attachable to a working machine, the frame comprising attachment members (314, 414) configured to attach to the working machine so that the frame is nondestructively detachable from the working machine, - an actuator member (315, 415) linearly movably supported with respect to the frame, and - a linear electric machine (316, 416) comprising a mover (317, 417) configured to direct impacts to the actuator member and a stator (318, 418) connected to the frame and provided with windings configured to generate a magnetic force directed to the mover in response to electric current supplied to the windings, the hammer device (312, 312) being characterized in that it further comprises a brake (301, 401) configured to brake movement of the mover of the linear electric machine, wherein the brake comprises: - a frame structure (102, 202), - an annular element (103, 203) linearly movable with respect to the frame structure, the annular element constituting a wall of an annular chamber (105, 205) for damper fluid, - a center element (104, 204) surrounded by the annular element and linearly movable with respect to the frame structure and the annular element, and - a spring (106, 206) configured to move the annular element with respect to the frame structure in a first direction (+z) in which a volume of the annular chamber is increasing, wherein the center element comprises a collar (107, 207) configured to abut to a contact portion (108, 208) of the annular element and to move the annular element together with the center element in a second direction (-z) opposite to the first direction and against a spring force of the spring, and a portion of the annular element surrounding the contact portion comprises apertures (109, 209) configured to conduct the damper fluid to flow to and from the annular chamber, wherein the spring is a plate spring configured to gradually close the apertures in response to a situation in which the annular element is moved in the second direction against the spring force, a plate (110, 210) of the spring getting gradually parallel with a surface of the annular element around the apertures in response to a situation in which the spring is compressed. - a frame (313, 412) attachable to a working machine, the frame comprising attachment members (314, 414) configured to attach to the working machine so that the frame is nondestructively detachable from the working machine, - an actuator member (315, 415) linearly movably supported with respect to the frame, and - a linear electric machine (316, 416) comprising a mover (317, 417) configured to direct impacts to the actuator member and a stator (318, 418) connected to the frame and provided with windings configured to generate a magnetic force directed to the mover in response to electric current supplied to the windings, wherein the brake comprises: - a frame structure (102, 202), - an annular element (103, 203) linearly movable with respect to the frame structure, the annular element constituting a wall of an annular chamber (105, 205) for damper fluid, - a center element (104, 204) surrounded by the annular element and linearly movable with respect to the frame structure and the annular element, and - a spring (106, 206) configured to move the annular element with respect to the frame structure in a first direction (+z) in which a volume of the annular chamber is increasing, - a frame structure (102, 202), - an annular element (103, 203) linearly movable with respect to the frame structure, the annular element constituting a wall of an annular chamber (105, 205) for damper fluid, - a center element (104, 204) surrounded by the annular element and linearly movable with respect to the frame structure and the annular element, and - a spring (106, 206) configured to move the annular element with respect to the frame structure in a first direction (+z) in which a volume of the annular chamber is increasing, wherein the center element comprises a collar (107, 207) configured to abut to a contact portion (108, 208) of the annular element and to move the annular element together with the center element in a second direction (-z) opposite to the first direction and against a spring force of the spring, and a portion of the annular element surrounding the contact portion comprises apertures (109, 209) configured to conduct the damper fluid to flow to and from the annular chamber, wherein the spring is a plate spring configured to gradually close the apertures in response to a situation in which the annular element is moved in the second direction against the spring force, a plate (110, 210) of the spring getting gradually parallel with a surface of the annular element around the apertures in response to a situation in which the spring is compressed.