Contains method of a line.