Package com.dropbox.core.v2.paper
Class Cursor
- java.lang.Object
- 
- com.dropbox.core.v2.paper.Cursor
 
- 
 public class Cursor extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Dateexpirationprotected java.lang.Stringvalue
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.DategetExpiration()Expiration time ofgetValue().java.lang.StringgetValue()The actual cursor value.inthashCode()java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
 
- 
- 
- 
Constructor Detail- 
Cursorpublic Cursor(java.lang.String value, java.util.Date expiration)- Parameters:
- value- The actual cursor value. Must not be- null.
- expiration- Expiration time of- getValue(). Some cursors might have expiration time assigned. This is a UTC value after which the cursor is no longer valid and the API starts returning an error. If cursor expires a new one needs to be obtained and pagination needs to be restarted. Some cursors might be short-lived some cursors might be long-lived. This really depends on the sorting type and order, e.g.: 1. on one hand, listing docs created by the user, sorted by the created time ascending will have undefinite expiration because the results cannot change while the iteration is happening. This cursor would be suitable for long term polling. 2. on the other hand, listing docs sorted by the last modified time will have a very short expiration as docs do get modified very often and the modified time can be changed while the iteration is happening thus altering the results.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 - 
Cursorpublic Cursor(java.lang.String value) NoneThe default values for unset fields will be used. - Parameters:
- value- The actual cursor value. Must not be- null.
- Throws:
- java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
 
 
- 
 - 
Method Detail- 
getValuepublic java.lang.String getValue() The actual cursor value.- Returns:
- value for this field, never null.
 
 - 
getExpirationpublic java.util.Date getExpiration() Expiration time ofgetValue(). Some cursors might have expiration time assigned. This is a UTC value after which the cursor is no longer valid and the API starts returning an error. If cursor expires a new one needs to be obtained and pagination needs to be restarted. Some cursors might be short-lived some cursors might be long-lived. This really depends on the sorting type and order, e.g.: 1. on one hand, listing docs created by the user, sorted by the created time ascending will have undefinite expiration because the results cannot change while the iteration is happening. This cursor would be suitable for long term polling. 2. on the other hand, listing docs sorted by the last modified time will have a very short expiration as docs do get modified very often and the modified time can be changed while the iteration is happening thus altering the results.- Returns:
- value for this field, or nullif not present.
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
toStringMultilinepublic java.lang.String toStringMultiline() Returns a String representation of this object formatted for easier readability.The returned String may contain newlines. - Returns:
- Formatted, multiline String representation of this object
 
 
- 
 
-