In archaic English it is often used to mean shepherd particularly in pastoral poetry. For example "Tell me ye swains that have conquered the fair". When we were at school we thought that this was really funny as the name of the writer of our mathematics textbook was Swain.