public class
MapOptional
MapOptional
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-11-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-29 UTC."],[],[],null,["# MapOptional\n\npublic class **MapOptional** \n\n### Public Methods\n\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| List\\\u003c[Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c?\\\u003e\\\u003e | [getValue](/jvm/api_docs/java/org/tensorflow/framework/data/impl/MapOptional#getValue())() Returns the value of the dataset element represented by this optional, if it exists. |\n\n### Inherited Methods\n\nFrom class [org.tensorflow.framework.data.DatasetOptional](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional) \n\n|----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [DatasetOptional](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional) | [fromComponents](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional#fromComponents(Ops, java.util.List\u003corg.tensorflow.Operand\u003c?\u003e\u003e, java.util.List\u003cjava.lang.Class\u003c? extends org.tensorflow.types.family.TType\u003e\u003e, java.util.List\u003corg.tensorflow.ndarray.Shape\u003e))(Ops tf, List\\\u003c[Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c?\\\u003e\\\u003e components, List\\\u003cClass\\\u003c? extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e\\\u003e outputTypes, List\\\u003c[Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape)\\\u003e outputShapes) |\n| Ops | [getOpsInstance](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional#getOpsInstance())() |\n| [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c?\\\u003e | [getOptionalVariant](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional#getOptionalVariant())() |\n| List\\\u003c[Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c?\\\u003e\\\u003e | [getValue](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional#getValue())() Returns the value of the dataset element represented by this optional, if it exists. |\n| [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c[TBool](/jvm/api_docs/java/org/tensorflow/types/TBool)\\\u003e | [hasValue](/jvm/api_docs/java/org/tensorflow/framework/data/DatasetOptional#hasValue())() Whether this optional has a value. |\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public List\\\u003c[Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003c?\\\u003e\\\u003e\n**getValue**\n()\n\nReturns the value of the dataset element represented by this optional, if it exists."]]