public static SmallIntSet from ( Set < Integer > set ) { if ( set instanceof SmallIntSet ) { return ( SmallIntSet ) set ; } else { return new SmallIntSet ( set ) ; } }
Either converts the given set to an IntSet if it is one or creates a new IntSet and copies the contents