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 enumresult typestatic enumunit -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intcountfinal @Nullable Stringgeocodestatic final Query.Unitkilo metersfinal Stringlangfinal Stringlocalefinal longmaxIdstatic final Query.Unitmilesstatic final Query.ResultTypemixed: Include both popular and real time results in the response.final @Nullable Stringnext page querystatic final Query.ResultTypepopular: return only the most popular results in the response.final @NotNull Stringquerystatic final Query.ResultTyperecent: return only the most recent results in the responsefinal @Nullable Query.ResultTyperesult typefinal @Nullable Stringsincefinal longsinceIdfinal @Nullable Stringuntil -
Method Summary
Modifier and TypeMethodDescription@NotNull Querycount(int count) creates a new Query instance with the specified countboolean@NotNull QuerygeoCode(@NotNull GeoLocation location, double radius, Query.Unit unit) creates a new Query instance with the specified geolocationinthashCode()@NotNull Querycreates a new Query instance with the specified lang@NotNull Querycreates a new Query instance with the specified locale@NotNull QuerymaxId(long maxId) creates a new Query instance with the specified maxIdstatic @NotNull Query@NotNull QueryresultType(@NotNull Query.ResultType resultType) creates a new Query instance with the specified result type@NotNull Querycreates a new Query instance with the specified since@NotNull QuerysinceId(long sinceId) creates a new Query instance with the specified sinceIdtoString()@NotNull Querycreates 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
-