{
  "id": "map",
  "title": "Map",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/gears-v1/jvm/classes/gearsbuilder/map/",
  "summary": "Maps records one-to-one.",
  "tags": [
    "docs",
    "operate",
    "stack"
  ],
  "last_updated": "2026-04-22T11:55:45+02:00",
  "page_type": "content",
  "content_hash": "b434062f1f4a03a6baba121f1917826b10152d3ec008bca9b8acfb9d3e2c4a17",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "[code example]\n\nMaps each input record in the pipe to an output record, one-to-one."
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "Type parameters:\n\n| Name | Description |\n|------|-------------|\n| I | The template type of the returned builder |\n\nFunction parameters:\n\n| Name | Type | Description |\n|------|------|-------------|\n| mapper | <nobr>MapOperation<T,​I></nobr> | For each input record, returns a new output record |"
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns a GearsBuilder object with a new template type."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "Map each record to its string value:\n\n[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "java",
      "code": "public <I extends java.io.Serializable> GearsBuilder<I> map​(\n\tgears.operations.MapOperation<T,​I> mapper)",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "java",
      "code": "GearsBuilder.CreateGearsBuilder(reader).\n \t\tmap(r->{\n    \t\treturn r.getStringVal();\n});",
      "section_id": "example"
    }
  ]
}
