Package rs.adsdev.ifconfig.client
Enum Class Field
- All Implemented Interfaces:
Serializable,Comparable<Field>,Constable
The set of top-level wire fields available on
/json responses,
mirroring the server's FlatField registry. Used to build
?fields=-filtered requests.
Two encodings are available:
wireName()– the JSON key, joined with commas:?fields=country,city,isp.bit()– the numeric position; OR the bits of the desired fields and pass the result as?fields=N.
Bit positions are pinned by the server and never renumbered; new fields claim the next free bit. The 32-bit signed-int ceiling means bits 0–30 are usable.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintbit()static inttoBitmask(Collection<Field> fields) ORs the bits of a collection of fields into a single integer, suitable for passing as?fields=N.static StringtoQuery(Collection<Field> fields) Joins the wire names of a collection of fields with commas, suitable for passing as?fields=country,city,isp.static FieldReturns the enum constant of this class with the specified name.static Field[]values()Returns an array containing the constants of this enum class, in the order they are declared.wireName()
-
Enum Constant Details
-
STATUS
-
MESSAGE
-
QUERY
-
CONTINENT
-
CONTINENT_CODE
-
COUNTRY
-
COUNTRY_CODE
-
REGION
-
REGION_NAME
-
CITY
-
DISTRICT
-
ZIP
-
LAT
-
LON
-
TIMEZONE
-
OFFSET
-
CURRENCY
-
ISP
-
ORG
-
AS
-
ASNAME
-
REVERSE
-
MOBILE
-
PROXY
-
HOSTING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
bit
public int bit() -
wireName
-
toQuery
Joins the wire names of a collection of fields with commas, suitable for passing as?fields=country,city,isp. -
toBitmask
ORs the bits of a collection of fields into a single integer, suitable for passing as?fields=N.
-