From 2c36b4bbcf88ae22437b7123244e9f6dd9af4025 Mon Sep 17 00:00:00 2001 From: qishipengqsp Date: Thu, 15 Aug 2024 19:22:19 +0800 Subject: [PATCH] use linkedhashset instead of hashset --- .../ldbc/finbench/datagen/entities/nodes/Company.java | 9 +++++---- .../ldbc/finbench/datagen/entities/nodes/Person.java | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/ldbc/finbench/datagen/entities/nodes/Company.java b/src/main/java/ldbc/finbench/datagen/entities/nodes/Company.java index c0616b84..cdc9323f 100644 --- a/src/main/java/ldbc/finbench/datagen/entities/nodes/Company.java +++ b/src/main/java/ldbc/finbench/datagen/entities/nodes/Company.java @@ -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; @@ -22,15 +23,15 @@ public class Company implements Serializable { private String url; private final List companyOwnAccounts; private final List companyInvestCompanies; - private final HashSet guaranteeSrc; - private final HashSet guaranteeDst; + private final LinkedHashSet guaranteeSrc; + private final LinkedHashSet guaranteeDst; private final List companyApplyLoans; public Company() { companyOwnAccounts = new LinkedList<>(); companyInvestCompanies = new LinkedList<>(); - guaranteeSrc = new HashSet<>(); - guaranteeDst = new HashSet<>(); + guaranteeSrc = new LinkedHashSet<>(); + guaranteeDst = new LinkedHashSet<>(); companyApplyLoans = new LinkedList<>(); } diff --git a/src/main/java/ldbc/finbench/datagen/entities/nodes/Person.java b/src/main/java/ldbc/finbench/datagen/entities/nodes/Person.java index 54cd63aa..8722b53c 100644 --- a/src/main/java/ldbc/finbench/datagen/entities/nodes/Person.java +++ b/src/main/java/ldbc/finbench/datagen/entities/nodes/Person.java @@ -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; @@ -21,15 +22,15 @@ public class Person implements Serializable { private int cityId; private List personOwnAccounts; private List personInvestCompanies; - private final HashSet guaranteeSrc; - private final HashSet guaranteeDst; + private final LinkedHashSet guaranteeSrc; + private final LinkedHashSet guaranteeDst; private List personApplyLoans; public Person() { personOwnAccounts = new LinkedList<>(); personInvestCompanies = new LinkedList<>(); - guaranteeSrc = new HashSet<>(); - guaranteeDst = new HashSet<>(); + guaranteeSrc = new LinkedHashSet<>(); + guaranteeDst = new LinkedHashSet<>(); personApplyLoans = new LinkedList<>(); }