Package org.simpleframework.http.parse
Class ListParser.Entry
java.lang.Object
org.simpleframework.http.parse.ListParser.Entry
- All Implemented Interfaces:
Comparable<ListParser<T>.Entry>
- Enclosing class:
ListParser<T>
The
Entry
object provides a comparable object to
insert in to a priority queue. This will sort the value using
the quality value parameter parsed from the list. If there
are values with the same quality value this this will sort
the values by a secondary order parameter.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
This is the value that is represented by this entry. -
priority
private final long priorityThis is the priority value that is used to sort entries. -
order
private final int orderThis is the secondary order value used to sort entries.
-
-
Constructor Details
-
Entry
Constructor for theEntry
object. This is used to create a comparable value that can be inserted in to a priority queue and extracted in order of the priority value.- Parameters:
value
- this is the value that is represented by thispriority
- this is the priority value for sortingorder
- this is the secondary priority value used
-
-
Method Details
-
getValue
This acquires the value represented by this entry. This is can be used to place the value within a list as it is taken from the priority queue. Acquiring the values in this way facilitates a priority ordered list of values.- Returns:
- this returns the value represented by this
-
compareTo
This is used to sort the entries within the priority queue using the provided priority of specified. If the entries have the same priority value then they are sorted using a secondary order value, which is the insertion index.- Specified by:
compareTo
in interfaceComparable<ListParser<T>.Entry>
- Parameters:
entry
- this is the entry to be compared to- Returns:
- this returns the result of the entry comparison
-