public class AcceptList extends Object
Constructor and Description |
---|
AcceptList(List<MediaRange> mediaRanges)
Create a list of accept items from the give strings.
|
AcceptList(MediaRange... acceptItems)
Create a list of accept items from the give MediaTypes.
|
AcceptList(String headerString)
Parse an HTTP Accept (or etc) header string.
|
Modifier and Type | Method and Description |
---|---|
static AcceptList |
create(MediaType... acceptItems)
Create a list of accept items from the give MediaTypes.
|
static AcceptList |
create(String... acceptStrings)
Create a list of accept items from strings.
|
MediaRange |
first() |
static MediaType |
match(AcceptList proposalList,
AcceptList offerList)
Find the best thing in offer list with the proposal
"best" means highest q value, with left most being better for same q.
|
MediaRange |
match(MediaRange aItem)
Find and return a match for a MediaRange
|
String |
toString() |
public AcceptList(List<MediaRange> mediaRanges)
mediaRanges
- public AcceptList(MediaRange... acceptItems)
acceptItems
- public AcceptList(String headerString)
headerString
- public static AcceptList create(MediaType... acceptItems)
acceptItems
- public static AcceptList create(String... acceptStrings)
acceptStrings
- public MediaRange match(MediaRange aItem)
public static MediaType match(AcceptList proposalList, AcceptList offerList)
proposalList
- Client list of possibilitiesofferList
- Server list of possibilitiespublic MediaRange first()
Licenced under the Apache License, Version 2.0