FlightNumberEntity
Stay organized with collections
Save and categorize content based on your preferences.
A flight number entity extracted from a piece of text. It provides the detected values for
the airline and flight number.
Inherited Constant Summary
Public Method Summary
String
|
getAirlineCode()
Returns the IATA airline designator detected for this entity (two or three
letters String).
|
String
|
getFlightNumber()
Returns the flight number detected for this entity (1 to 4 digit number,
represented as a String).
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
public String getAirlineCode ()
Returns the IATA airline designator detected for this entity (two or three letters
String).
public String getFlightNumber ()
Returns the flight number detected for this entity (1 to 4 digit number, represented
as a String).
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 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eFlightNumberEntity\u003c/code\u003e provides extracted airline and flight number information from text.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the \u003ccode\u003eEntity\u003c/code\u003e class and is identified by \u003ccode\u003eTYPE_FLIGHT_NUMBER\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the airline code using \u003ccode\u003egetAirlineCode()\u003c/code\u003e (two or three letter IATA code).\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the flight number using \u003ccode\u003egetFlightNumber()\u003c/code\u003e (1 to 4 digit number as a String).\u003c/p\u003e\n"]]],[],null,["# FlightNumberEntity\n\npublic final class **FlightNumberEntity** extends [Entity](/android/reference/com/google/mlkit/nl/entityextraction/Entity) \nA flight number entity extracted from a piece of text. It provides the detected values for\nthe airline and flight number. \n\n### Inherited Constant Summary\n\nFrom class [com.google.mlkit.nl.entityextraction.Entity](/android/reference/com/google/mlkit/nl/entityextraction/Entity) \n\n|-----|-------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|\n| int | [TYPE_ADDRESS](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_ADDRESS) | Identifies a physical address. |\n| int | [TYPE_DATE_TIME](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_DATE_TIME) | Identifies a time reference that includes a specific time. |\n| int | [TYPE_EMAIL](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_EMAIL) | Identifies an e-mail address. |\n| int | [TYPE_FLIGHT_NUMBER](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_FLIGHT_NUMBER) | Identifies a flight number in IATA format. |\n| int | [TYPE_IBAN](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_IBAN) | Identifies an International Bank Account Number (IBAN). |\n| int | [TYPE_ISBN](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_ISBN) | Identifies an International Standard Book Number (ISBN). |\n| int | [TYPE_MONEY](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_MONEY) | Identifies an amount of money. |\n| int | [TYPE_PAYMENT_CARD](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_PAYMENT_CARD) | Identifies a payment card. |\n| int | [TYPE_PHONE](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_PHONE) | Identifies a phone number. |\n| int | [TYPE_TRACKING_NUMBER](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_TRACKING_NUMBER) | Identifies a shipment tracking number. |\n| int | [TYPE_URL](/android/reference/com/google/mlkit/nl/entityextraction/Entity#TYPE_URL) | Identifies a URL. |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [String](//developer.android.com/reference/java/lang/String.html) | [getAirlineCode](/android/reference/com/google/mlkit/nl/entityextraction/FlightNumberEntity#getAirlineCode())() Returns the IATA airline designator detected for this entity (two or three letters String). |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getFlightNumber](/android/reference/com/google/mlkit/nl/entityextraction/FlightNumberEntity#getFlightNumber())() Returns the flight number detected for this entity (1 to 4 digit number, represented as a String). |\n\n### Inherited Method Summary\n\nFrom class [com.google.mlkit.nl.entityextraction.Entity](/android/reference/com/google/mlkit/nl/entityextraction/Entity) \n\n|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DateTimeEntity](/android/reference/com/google/mlkit/nl/entityextraction/DateTimeEntity) | [asDateTimeEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asDateTimeEntity())() Convenience method that returns the current entity cast to a DateTimeEntity. |\n| [FlightNumberEntity](/android/reference/com/google/mlkit/nl/entityextraction/FlightNumberEntity) | [asFlightNumberEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asFlightNumberEntity())() Convenience method that returns the current entity cast to a FlightNumberEntity. |\n| [IbanEntity](/android/reference/com/google/mlkit/nl/entityextraction/IbanEntity) | [asIbanEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asIbanEntity())() Convenience method that returns the current entity cast to a IbanEntity. |\n| [IsbnEntity](/android/reference/com/google/mlkit/nl/entityextraction/IsbnEntity) | [asIsbnEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asIsbnEntity())() Convenience method that returns the current entity cast to a IsbnEntity. |\n| [MoneyEntity](/android/reference/com/google/mlkit/nl/entityextraction/MoneyEntity) | [asMoneyEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asMoneyEntity())() Convenience method that returns the current entity cast to a MoneyEntity. |\n| [PaymentCardEntity](/android/reference/com/google/mlkit/nl/entityextraction/PaymentCardEntity) | [asPaymentCardEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asPaymentCardEntity())() Convenience method that returns the current entity cast to a PaymentCardEntity. |\n| [TrackingNumberEntity](/android/reference/com/google/mlkit/nl/entityextraction/TrackingNumberEntity) | [asTrackingNumberEntity](/android/reference/com/google/mlkit/nl/entityextraction/Entity#asTrackingNumberEntity())() Convenience method that returns the current entity cast to a TrackingNumberEntity. |\n| int | [getType](/android/reference/com/google/mlkit/nl/entityextraction/Entity#getType())() Returns the type(e.g. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/nl/entityextraction/Entity#toString())() |\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | 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 [String](//developer.android.com/reference/java/lang/String.html) **getAirlineCode** ()\n\nReturns the IATA airline designator detected for this entity (two or three letters\nString). \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getFlightNumber** ()\n\nReturns the flight number detected for this entity (1 to 4 digit number, represented\nas a String)."]]