-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
1,238 additions
and
623 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
53 changes: 53 additions & 0 deletions
53
app/src/main/java/ryey/easer/core/data/ScenarioStructure.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package ryey.easer.core.data; | ||
|
||
import ryey.easer.Utils; | ||
import ryey.easer.commons.plugindef.eventplugin.EventData; | ||
import ryey.easer.core.data.storage.ScenarioDataStorage; | ||
|
||
public class ScenarioStructure implements Named, Verifiable { | ||
|
||
private String name; | ||
private EventData eventData; | ||
|
||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public EventData getEventData() { | ||
return eventData; | ||
} | ||
|
||
public void setEventData(EventData eventData) { | ||
this.eventData = eventData; | ||
} | ||
|
||
public boolean isTmpScenario() { | ||
return ScenarioDataStorage.hasTmp(name); | ||
} | ||
|
||
@Override | ||
public boolean isValid() { | ||
if ((name == null) || (name.isEmpty())) | ||
return false; | ||
if ((eventData == null) || (!eventData.isValid())) | ||
return false; | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == null || !(obj instanceof ScenarioStructure)) | ||
return false; | ||
if (!Utils.nullableEqual(name, ((ScenarioStructure) obj).name)) | ||
return false; | ||
if (!Utils.nullableEqual(eventData, ((ScenarioStructure) obj).eventData)) | ||
return false; | ||
return true; | ||
} | ||
} |
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
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
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
Oops, something went wrong.