Package twitter4j.v1
Class Query
java.lang.Object
twitter4j.v1.Query
- All Implemented Interfaces:
Serializable
A data class represents search query.
An instance of this class is NOT thread safe.
Instances can be shared across threads, but should not be mutated while a search is ongoing.
An instance of this class is NOT thread safe.
Instances can be shared across threads, but should not be mutated while a search is ongoing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
result typestatic enum
unit -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
countfinal @Nullable String
geocodestatic final Query.Unit
kilo metersfinal String
langfinal String
localefinal long
maxIdstatic final Query.Unit
milesstatic final Query.ResultType
mixed: Include both popular and real time results in the response.final @Nullable String
next page querystatic final Query.ResultType
popular: return only the most popular results in the response.final @NotNull String
querystatic final Query.ResultType
recent: return only the most recent results in the responsefinal @Nullable Query.ResultType
result typefinal @Nullable String
sincefinal long
sinceIdfinal @Nullable String
until -
Method Summary
Modifier and TypeMethodDescription@NotNull Query
count
(int count) creates a new Query instance with the specified countboolean
@NotNull Query
geoCode
(@NotNull GeoLocation location, double radius, Query.Unit unit) creates a new Query instance with the specified geolocationint
hashCode()
@NotNull Query
creates a new Query instance with the specified lang@NotNull Query
creates a new Query instance with the specified locale@NotNull Query
maxId
(long maxId) creates a new Query instance with the specified maxIdstatic @NotNull Query
@NotNull Query
resultType
(@NotNull Query.ResultType resultType) creates a new Query instance with the specified result type@NotNull Query
creates a new Query instance with the specified since@NotNull Query
sinceId
(long sinceId) creates a new Query instance with the specified sinceIdtoString()
@NotNull Query
creates a new Query instance with the specified until
-
Field Details
-
query
query -
lang
lang -
locale
locale -
maxId
public final long maxIdmaxId -
count
public final int countcount -
since
since -
sinceId
public final long sinceIdsinceId -
geocode
geocode -
until
until -
resultType
result type -
nextPageQuery
next page query -
MILES
miles -
KILOMETERS
kilo meters -
MIXED
mixed: Include both popular and real time results in the response. -
POPULAR
popular: return only the most popular results in the response. -
RECENT
recent: return only the most recent results in the response
-
-
Method Details
-
lang
creates a new Query instance with the specified lang- Parameters:
lang
- lang- Returns:
- new Query instance
-
locale
creates a new Query instance with the specified locale- Parameters:
locale
- locale- Returns:
- new Query instance
-
maxId
creates a new Query instance with the specified maxId- Parameters:
maxId
- maxId- Returns:
- new Query instance
-
count
creates a new Query instance with the specified count- Parameters:
count
- count- Returns:
- new Query instance
-
since
creates a new Query instance with the specified since- Parameters:
since
- since- Returns:
- new Query instance
-
sinceId
creates a new Query instance with the specified sinceId- Parameters:
sinceId
- sinceId- Returns:
- new Query instance
-
geoCode
@NotNull public @NotNull Query geoCode(@NotNull @NotNull GeoLocation location, double radius, Query.Unit unit) creates a new Query instance with the specified geolocation- Parameters:
location
- geolocationradius
- radiusunit
- unit- Returns:
- new Query instance
-
until
creates a new Query instance with the specified until- Parameters:
until
- until- Returns:
- new Query instance
-
resultType
creates a new Query instance with the specified result type- Parameters:
resultType
- result type- Returns:
- new Query instance
-
of
- Parameters:
query
- query- Returns:
- Query
-
equals
-
hashCode
public int hashCode() -
toString
-