@Override
 public void apply(final CyNetworkView networkView) {
   @SuppressWarnings("unchecked")
   // This is always safe.
   final ApplyHandler<CyNetwork> networkViewHandler = applyHandlersMap.get(CyNetwork.class);
   networkViewHandler.apply(null, networkView);
 }
  @SuppressWarnings({"unchecked", "rawtypes"})
  @Override
  public void apply(final CyRow row, final View<? extends CyIdentifiable> view) {
    if (view == null) {
      logger.warn("Tried to apply Visual Style to null view");
      return;
    }

    ApplyHandler handler = null;

    for (final Class<?> viewType : applyHandlersMap.keySet()) {
      if (viewType.isAssignableFrom(view.getModel().getClass())) {
        handler = applyHandlersMap.get(viewType);
        break;
      }
    }

    if (handler == null)
      throw new IllegalArgumentException("This view type is not supported: " + view.getClass());

    handler.apply(row, view);
  }