Created
April 13, 2018 07:31
-
-
Save Pudding124/3a527daa56f53785c874867091e965e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 將每個相同 Relationship 集中存入到 ArrayList 中,因為一個 Node 可能會有多個關係 | |
@Relationship(type="CRUSH_ON") | |
ArrayList<Crush_On> crush_Ons = new ArrayList<Crush_On>(); | |
@Relationship(type="HATE") | |
ArrayList<Hate> hates = new ArrayList<Hate>(); | |
@Relationship(type="LIKE") | |
ArrayList<Like> likes = new ArrayList<Like>(); | |
public void addCrushOnRelationship(Person personA, Person personB) { | |
Crush_On crush_On = new Crush_On(personA, personB); | |
crush_Ons.add(crush_On); | |
} | |
public void addHateRelationship(Person personA, Person personB) { | |
Hate hate = new Hate(personA, personB); | |
hates.add(hate); | |
} | |
public void addLikeRelationship(Person personA, Person personB) { | |
Like like = new Like(personA, personB); | |
likes.add(like); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment