{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Class: SelectedItem<T>","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/readme"},"children":["API"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit"},"children":["geotoolkit"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.selection"},"children":["selection"]}," / ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.selection.selecteditem"},"children":["SelectedItem"]}," / SelectedItem"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"class-selecteditemt","__idx":0},"children":["Class: SelectedItem<T>"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.selection"},"children":["selection"]},".",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.selection.selecteditem"},"children":["SelectedItem"]},".SelectedItem"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Base class for selected item, that could be returned via Selector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Throws"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Error if sender is not set"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"type-parameters","__idx":1},"children":["Type parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["extends ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/interfaces/geotoolkit.selection.selecteditem.withhittest"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WithHitTest"]}]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"hierarchy","__idx":2},"children":["Hierarchy"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SelectedItem"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["↳ ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.welllog.logcurveselecteditem.logcurveselecteditem"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LogCurveSelectedItem"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"table-of-contents","__idx":3},"children":["Table of contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem#new-selecteditem&lt;t&gt;sender-data"},"children":["new SelectedItem&lt;T&amp;gt;(sender, data)"]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem#getclassname"},"children":["getClassName"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem#getdata"},"children":["getData"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem#getsender"},"children":["getSender"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem#getclassname-1"},"children":["getClassName"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"contents","__idx":4},"children":["Contents"]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Constructors"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"new-selecteditemlttampgtsender-data","__idx":5},"children":["new SelectedItem&lt;T&amp;gt;(sender, data)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["• ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["new SelectedItem"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]},">(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data?"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create selected item"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"type-parameters-1","__idx":6},"children":["Type parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["extends ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/interfaces/geotoolkit.selection.selecteditem.withhittest"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WithHitTest"]}]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters","__idx":7},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["node that create the item"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReturnType"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]},"[",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"hitTest\""]},"]>"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["some data"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"details","attributes":{"open":"true"},"children":[{"$$mdtype":"Tag","name":"summary","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"fontSize":"1.25em","fontWeight":"bold"}},"children":["Methods"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getclassname","__idx":8},"children":["getClassName"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getClassName"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns","__idx":9},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getdata","__idx":10},"children":["getData"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getData"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["U"]},">(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A?"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReturnType"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["U"]},"[",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"hitTest\""]},"]>"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import {isSelectedItem} from '@int/geotoolkit/selection/SelectedItem';\nconst items = Selector.select(root, devicePoint, 3).filter(isSelectedItem);\nitems.forEach((item) => {\nconst data = item.getData(LogSinusoid);\nif (data) { // it means this SelectedItem came from LogSinusoid\n// now inside 'if' typescript knows type of data\ndata[0].getDepth();\n}\n});\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"type-parameters-2","__idx":11},"children":["Type parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["U"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["extends ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/interfaces/geotoolkit.selection.selecteditem.withhittest"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WithHitTest"]}]}," = ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"parameters-1","__idx":12},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Name"},"children":["Name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Type"},"children":["Type "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"50%","data-label":"Description"},"children":["Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Optional"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/geotoolkit/apis/modules/geotoolkit.base#constructable"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Constructable"]}]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["U"]},">"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["if provided vetify that this SelectedItem came from provided type"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-1","__idx":13},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReturnType"]},"<",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["U"]},"[",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"hitTest\""]},"]>"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getsender","__idx":14},"children":["getSender"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getSender"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets sender"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-2","__idx":15},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["T"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"getclassname-1","__idx":16},"children":["getClassName"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Static"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["getClassName"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"returns-3","__idx":17},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]}]}]},"headings":[{"value":"Class: SelectedItem<T>","id":"class-selecteditemt","depth":1},{"value":"Type parameters","id":"type-parameters","depth":2},{"value":"Hierarchy","id":"hierarchy","depth":2},{"value":"Table of contents","id":"table-of-contents","depth":2},{"value":"Contents","id":"contents","depth":2},{"value":"new SelectedItem&lt;T&amp;gt;(sender, data)","id":"new-selecteditemlttampgtsender-data","depth":4},{"value":"Type parameters","id":"type-parameters-1","depth":4},{"value":"Parameters","id":"parameters","depth":4},{"value":"getClassName","id":"getclassname","depth":4},{"value":"Returns","id":"returns","depth":4},{"value":"getData","id":"getdata","depth":4},{"value":"Type parameters","id":"type-parameters-2","depth":4},{"value":"Parameters","id":"parameters-1","depth":4},{"value":"Returns","id":"returns-1","depth":4},{"value":"getSender","id":"getsender","depth":4},{"value":"Returns","id":"returns-2","depth":4},{"value":"getClassName","id":"getclassname-1","depth":4},{"value":"Returns","id":"returns-3","depth":4}],"frontmatter":{"seo":{"title":"Class: SelectedItem<T>"}},"lastModified":"2026-02-11T19:54:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/geotoolkit/apis/classes/geotoolkit.selection.selecteditem.selecteditem","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}