Album
The Switch.Album
class allows for interacting with the Switch's photo gallery,
providing access to the screenshots / video recordings that the user has saved.
It is a Set
subclass, which contains entries of
Switch.AlbumFile
instances.
Example
Extends
Constructors
new Album()
new Album(storage
): Album
Parameters
Parameter | Type |
---|---|
storage | number |
Returns
Overrides
Set<AlbumFile>.constructor
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
[toStringTag] | readonly | string | - | Set.[toStringTag] |
size | readonly | number | Set.size | |
storage | readonly | number | - | - |
[species] | readonly | SetConstructor | - | Set.[species] |
Methods
[iterator]()
[iterator](): SetIterator
<AlbumFile
>
Returns
SetIterator
<AlbumFile
>
Overrides
Set.[iterator]
add()
add(value
): this
Appends a new element with a specified value to the end of the Set.
Parameters
Parameter | Type |
---|---|
value | AlbumFile |
Returns
this
Inherited from
Set.add
clear()
clear(): void
Returns
void
Inherited from
Set.clear
delete()
delete(value
): boolean
Removes a specified value from the Set.
Parameters
Parameter | Type |
---|---|
value | AlbumFile |
Returns
boolean
Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
Inherited from
Set.delete
difference()
Type Parameters
Type Parameter |
---|
U |
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <U > |
Returns
a new Set containing all the elements in this Set which are not also in the argument.
Inherited from
Set.difference
entries()
Returns an iterable of [v,v] pairs for every value v
in the set.
Returns
SetIterator
<[AlbumFile
, AlbumFile
]>
Overrides
Set.entries
forEach()
forEach(callbackfn
, thisArg
?): void
Executes a provided function once per each value in the Set object, in insertion order.
Parameters
Parameter | Type |
---|---|
callbackfn | (value , value2 , set ) => void |
thisArg ? | any |
Returns
void
Inherited from
Set.forEach
has()
has(value
): boolean
Parameters
Parameter | Type |
---|---|
value | AlbumFile |
Returns
boolean
a boolean indicating whether an element with the specified value exists in the Set or not.
Inherited from
Set.has
intersection()
Type Parameters
Type Parameter |
---|
U |
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <U > |
Returns
a new Set containing all the elements which are both in this Set and in the argument.
Inherited from
Set.intersection
isDisjointFrom()
isDisjointFrom(other
): boolean
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <unknown > |
Returns
boolean
a boolean indicating whether this Set has no elements in common with the argument.
Inherited from
Set.isDisjointFrom
isSubsetOf()
isSubsetOf(other
): boolean
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <unknown > |
Returns
boolean
a boolean indicating whether all the elements in this Set are also in the argument.
Inherited from
Set.isSubsetOf
isSupersetOf()
isSupersetOf(other
): boolean
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <unknown > |
Returns
boolean
a boolean indicating whether all the elements in the argument are also in this Set.
Inherited from
Set.isSupersetOf
keys()
keys(): SetIterator
<AlbumFile
>
Despite its name, returns an iterable of the values in the set.
Returns
SetIterator
<AlbumFile
>
Overrides
Set.keys
symmetricDifference()
Type Parameters
Type Parameter |
---|
U |
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <U > |
Returns
a new Set containing all the elements which are in either this Set or in the argument, but not in both.
Inherited from
Set.symmetricDifference
union()
Type Parameters
Type Parameter |
---|
U |
Parameters
Parameter | Type |
---|---|
other | ReadonlySetLike <U > |
Returns
a new Set containing all the elements in this Set and also all the elements in the argument.
Inherited from
Set.union
values()
values(): SetIterator
<AlbumFile
>
Returns an iterable of values in the set.
Returns
SetIterator
<AlbumFile
>
Overrides
Set.values