Package org.symbol.sdk
Class Network.NetworkLocator
java.lang.Object
org.symbol.sdk.Network.NetworkLocator
- Enclosing class:
Network<TAddress extends ByteArray,TNetworkTimestamp extends NetworkTimestamp.Base>
- NetworkLocator
- Provides utility functions for finding a network.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <TNetwork extends Network<?,?>>
TNetworkfindByIdentifier(List<TNetwork> networks, byte identifier) Convenience overload finding a network by a single identifier.static <TNetwork extends Network<?,?>>
TNetworkfindByIdentifier(List<TNetwork> networks, List<Byte> identifiers) Finds a network with one of the specified identifiers within a list of networks.static <TNetwork extends Network<?,?>>
TNetworkfindByName(List<TNetwork> networks, String name) Find a network by a single name.static <TNetwork extends Network<?,?>>
TNetworkfindByName(List<TNetwork> networks, List<String> names) Finds a network with one of the specified names within a list of networks.
-
Method Details
-
findByName
public static <TNetwork extends Network<?,?>> TNetwork findByName(List<TNetwork> networks, List<String> names) - NetworkLocator.findByName
- Finds a network with one of the specified names within a list of networks.
- Type Parameters:
TNetwork- Network type.- Parameters:
networks- List of networks to search.names- Names for which to search.- Returns:
- First network with a name in the supplied list.
-
findByName
public static <TNetwork extends Network<?,?>> TNetwork findByName(List<TNetwork> networks, String name) - NetworkLocator.findByName
- Find a network by a single name.
- Type Parameters:
TNetwork- Network type.- Parameters:
networks- List of networks to search.name- Name for which to search.- Returns:
- First network with a matching name.
-
findByIdentifier
public static <TNetwork extends Network<?,?>> TNetwork findByIdentifier(List<TNetwork> networks, List<Byte> identifiers) - NetworkLocator.findByIdentifier
- Finds a network with one of the specified identifiers within a list of networks.
- Type Parameters:
TNetwork- Network type.- Parameters:
networks- List of networks to search.identifiers- Identifiers for which to search.- Returns:
- First network with an identifier in the supplied list.
-
findByIdentifier
public static <TNetwork extends Network<?,?>> TNetwork findByIdentifier(List<TNetwork> networks, byte identifier) - NetworkLocator.findByIdentifier
- Convenience overload finding a network by a single identifier.
- Type Parameters:
TNetwork- Network type.- Parameters:
networks- List of networks to search.identifier- Identifier for which to search.- Returns:
- First network with a matching identifier.
-