/** Add a Struct */ @Override public boolean add(Object obj) { if (!(obj instanceof StructImpl)) { throw new IllegalArgumentException( "This set only accepts StructImpl"); } StructImpl s = (StructImpl) obj; if (!this.elementType.equals(s.getStructType())) { throw new IllegalArgumentException( String.format( "obj does not have the same StructType.; collection structype,%s; added obj type=%s", this.elementType, s.getStructType())); } return addFieldValues(s.getFieldValues()); }