Skip to content

Commit

Permalink
use linkedhashset instead of hashset
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp committed Aug 15, 2024
1 parent 9fa0ce5 commit 2c36b4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.Serializable;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import ldbc.finbench.datagen.entities.edges.CompanyApplyLoan;
Expand All @@ -22,15 +23,15 @@ public class Company implements Serializable {
private String url;
private final List<CompanyOwnAccount> companyOwnAccounts;
private final List<CompanyInvestCompany> companyInvestCompanies;
private final HashSet<CompanyGuaranteeCompany> guaranteeSrc;
private final HashSet<CompanyGuaranteeCompany> guaranteeDst;
private final LinkedHashSet<CompanyGuaranteeCompany> guaranteeSrc;
private final LinkedHashSet<CompanyGuaranteeCompany> guaranteeDst;
private final List<CompanyApplyLoan> companyApplyLoans;

public Company() {
companyOwnAccounts = new LinkedList<>();
companyInvestCompanies = new LinkedList<>();
guaranteeSrc = new HashSet<>();
guaranteeDst = new HashSet<>();
guaranteeSrc = new LinkedHashSet<>();
guaranteeDst = new LinkedHashSet<>();
companyApplyLoans = new LinkedList<>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.Serializable;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import ldbc.finbench.datagen.entities.edges.PersonApplyLoan;
Expand All @@ -21,15 +22,15 @@ public class Person implements Serializable {
private int cityId;
private List<PersonOwnAccount> personOwnAccounts;
private List<PersonInvestCompany> personInvestCompanies;
private final HashSet<PersonGuaranteePerson> guaranteeSrc;
private final HashSet<PersonGuaranteePerson> guaranteeDst;
private final LinkedHashSet<PersonGuaranteePerson> guaranteeSrc;
private final LinkedHashSet<PersonGuaranteePerson> guaranteeDst;
private List<PersonApplyLoan> personApplyLoans;

public Person() {
personOwnAccounts = new LinkedList<>();
personInvestCompanies = new LinkedList<>();
guaranteeSrc = new HashSet<>();
guaranteeDst = new HashSet<>();
guaranteeSrc = new LinkedHashSet<>();
guaranteeDst = new LinkedHashSet<>();
personApplyLoans = new LinkedList<>();
}

Expand Down

0 comments on commit 2c36b4b

Please sign in to comment.