@Test public void obtaining_new_data_type() throws Exception { SetDataType t1 = SetDataType.set_of(m_scope.int8(), m_scope); assertSame(t1, SetDataType.set_of(m_scope.int8(), m_scope)); }
public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new SetDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, SetDataType.class); return (SetDataType) found; }
SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new SetDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, SetDataType.class); return (SetDataType) found; } }
SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new SetDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, SetDataType.class); return (SetDataType) found; } SetDataType(DataType inner_type, AnyType any); }
SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new SetDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, SetDataType.class); return (SetDataType) found; } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override boolean is_abstract(); }
SetDataType extends CollectionDataType { public static SetDataType set_of(DataType inner, PrimitiveScope pscope) { Ensure.not_null(inner); Ensure.not_null(pscope); Ensure.is_true(inner.in_scope(pscope)); DataTypeScope scope = inner.parent_dts(); DataType found = null; try { found = scope.find(build_set_name(inner)); } catch (AmbiguousNameException e) { } if (found == null) { found = new SetDataType(inner, pscope.any()); scope.add(found); } Ensure.not_null(found); Ensure.is_instance(found, SetDataType.class); return (SetDataType) found; } SetDataType(DataType inner_type, AnyType any); static final String build_set_name(DataType inner); static SetDataType set_of(DataType inner, PrimitiveScope pscope); @Override SetDataValue make(); @Override boolean is_abstract();  }