code: public static CollisionFunction imports(Xml parent)
      {
          Check.notNull(parent);
  
          final Xml node = parent.getChild(FUNCTION);
          final String name = node.readString(TYPE);
          try
          {
              final CollisionFunctionType type = CollisionFunctionType.valueOf(name);
              switch (type)
              {
                  case LINEAR:
                      return new CollisionFunctionLinear(node.readDouble(A), node.readDouble(B));
                  default:
                      throw new LionEngineException(ERROR_TYPE + name);
              }
          }
          catch (final IllegalArgumentException | NullPointerException exception)
          {
              throw new LionEngineException(exception, ERROR_TYPE + name);
          }
      }
docs: Create the collision function from node.
  
  @param parent The parent reference (must not be <code>null</code>).
  @return The collision function data.
  @throws LionEngineException If error when reading node.