To preserve its independence, and give security against foreign aggression and encroachment, is the highest duty of every nation, and to attain these ends nearly all other considerations are to be subordinated. It matters not in what form such aggression and encroachment come, whether from the foreign nation acting in its national character, or from vast hordes of its people crowding in upon us. The government, possessing the powers which are to be exercised for protection and security, is clothed with authority to determine the occasion on which the powers shall be called forth, and its determinations, so far as the subjects affected are concerned, are necessarily conclusive upon all its departments and officers. If, therefore, the government of the United States, through its legislative department, considers the presence of foreigners of a different race in this country, who will not assimilate with us, to be dangerous to its peace and security, their exclusion is not to be stayed because at the time there are no actual hostilities with the nation of which the foreigners are subjects.