PendingRequestList
open class PendingRequestList : ListBase, Sequence
A list of item type PendingRequest
.
-
Undocumented
Declaration
Swift
public subscript(index: Int) -> PendingRequest { get set }
-
An immutable empty
PendingRequestList
.Declaration
Swift
public static let empty: PendingRequestList
-
Should request headers be included when logging requests. Defaults to
true
.Declaration
Swift
final public var includeHeaders: Bool
-
Should request content be included when logging requests. Defaults to
true
.Declaration
Swift
final public var includeContent: Bool
-
Should request credentials be hidden (masked) when logging requests. Defaults to
true
. Credentials include the HTTPAuthorization
header and the HTTPCookie
header.Declaration
Swift
final public var hideCredentials: Bool
-
Construct a new list with
length
of zero and optional initialcapacity
. A list can expand in length beyond its initial capacity, but best performance will be obtained if the initial capacity is close to (and not less than) the list’s maximum length.Declaration
Swift
override public init(capacity: Int = (4 as Int))
Parameters
capacity
Optional initial capacity.
-
Add
item
to the end of this list.Declaration
Swift
open func append(_ item: PendingRequest)
Parameters
item
Item to be added.
-
Add all the items of
list
to the end of this list.Declaration
Swift
open func append(contentsOf list: PendingRequestList)
Parameters
list
Items to be added.
-
Call
PendingRequest.cancel
for all requests in this list.Declaration
Swift
open func cancelAll() throws
-
Declaration
Swift
open func copy() -> PendingRequestList
Return Value
A shallow copy of this list.
-
Declaration
Swift
open func filter(_ predicate: @escaping (PendingRequest) -> Bool) -> PendingRequestList
Parameters
predicate
Function to be applied to each item of this list. Items matching this predicate will be returned in the new list.
Return Value
A new list which contains the items of this list that match a specified predicate function. Ordering is preserved.
-
Throws
EmptyListException
if the list is empty.Declaration
Swift
open func first() -> PendingRequest
Return Value
The first item in this list.
-
Convert array to list.
Declaration
Swift
open class func fromArray(_ array: Array<PendingRequest>) -> PendingRequestList
Parameters
array
Array with source items.
Return Value
New list with items copied from
array
parameter. -
Declaration
Swift
open func includes(item: PendingRequest) -> Bool
Parameters
item
Item for comparison. Comparison uses the
equality
property, which would usually be expected to match the==
operator for item typePendingRequest
.Return Value
true
if this list containsitem
. -
Declaration
Swift
open func indexOf(item: PendingRequest, start: Int = (0 as Int)) -> Int
Parameters
item
Item for comparison. Comparison uses the
equality
property, which would usually be expected to match the==
operator for item typePendingRequest
.start
Zero-based starting index (search moves forwards from this index).
Return Value
First index in this list of
item
, or-1
if not found. -
Insert
item
into this list, before the item (if any) atindex
.Throws
ListIndexException
ifindex
is out of range (0 tolength
).Declaration
Swift
open func insert(at index: Int, item: PendingRequest)
Parameters
index
Zero-based index.
item
Item to be added.
-
Insert all items of
list
into this list, before the item (if any) atindex
.Throws
ListIndexException
ifindex
is out of range (0 tolength
).Declaration
Swift
open func insert(at index: Int, contentsOf list: PendingRequestList)
Parameters
index
Zero-based index.
list
List of items to be inserted.
-
Throws
ListIndexException
ifindex
is out of range (0 tolength
- 1).Declaration
Swift
open func item(at index: Int) -> PendingRequest
Parameters
index
Zero-based index.
Return Value
The item in this list at the specified
index
. -
Throws
EmptyListException
if the list is empty.Declaration
Swift
open func last() -> PendingRequest
Return Value
The last item in this list.
-
Declaration
Swift
open func lastIndexOf(item: PendingRequest, start: Int = (2147483647 as Int)) -> Int
Parameters
item
Item for comparison. Comparison uses the
equality
property, which would usually be expected to match the==
operator for item typePendingRequest
.start
Zero-based starting index (search moves backwards from this index).
Return Value
Last index in this list of
item
, or-1
if not found. -
Log all of the pending requests in this list at the specified log
level
.Declaration
Swift
open func log(level: Int) throws
Parameters
level
Log level.
-
Log all of the pending requests in this list at the
info
log level.Declaration
Swift
open func logDebug() throws
-
Log all of the pending requests in this list at the
error
log level.Declaration
Swift
open func logError() throws
-
Log all of the pending requests in this list at the
info
log level.Declaration
Swift
open func logInfo() throws
-
Log all of the pending requests in this list at the
info
log level.Declaration
Swift
open func logTrace() throws
-
Log all of the pending requests in this list at the
warn
log level.Declaration
Swift
open func logWarn() throws
-
Declaration
Swift
open func makeIterator() -> IndexingIterator<Array<PendingRequest>>
Return Value
This list converted to a Swift iterator.
-
Return a new
PendingRequestList
that shares theListBase.untypedList
as thelist
parameter. To ensure type safety, items inlist
that do not have the item typePendingRequest
will be removed.Declaration
Swift
open class func share(_ list: ListBase) -> PendingRequestList
Parameters
list
List whose items will be shared by the resulting list.
Return Value
A new list of item type
PendingRequest
, sharing the same items aslist
. -
Throws
EmptyListException
if the list has no items,NotUniqueException
if the list has multiple items.Declaration
Swift
open func single() -> PendingRequest
Return Value
A single item from this list.
-
Declaration
Swift
open func slice(start: Int, end: Int = (2147483647 as Int)) -> PendingRequestList
Parameters
start
Zero-based starting index (inclusive), or negative for starting index relative to the end of this list.
end
Zero-based ending index (exclusive), or negative for ending index relative to the end of this list.
Return Value
A slice of this list from index
start
(inclusive) to indexend
(exclusive). -
Convert list to array.
Declaration
Swift
open func toArray() -> Array<PendingRequest>
Return Value
New array with items copied from this list.
-
Set the item in this list at the specified
index
.Declaration
Swift
open func update(at index: Int, item: PendingRequest)
Parameters
index
Zero-based index.
item
Item value.