Class Network.NetworkLocator

java.lang.Object
org.symbol.sdk.Network.NetworkLocator
Enclosing class:
Network<TAddress extends ByteArray,TNetworkTimestamp extends NetworkTimestamp.Base>

public static final class Network.NetworkLocator extends Object
NetworkLocator
Provides utility functions for finding a network.
  • 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.