Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Projet GORDYJAN_BAGNOLY_GARCIA_POIGNONNEC
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POIGNONNEC
Projet GORDYJAN_BAGNOLY_GARCIA_POIGNONNEC
Commits
bad020ac
Commit
bad020ac
authored
May 07, 2019
by
Théo GORDYJAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add_enum
parent
7968a17a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
190 additions
and
98 deletions
+190
-98
description.html
garage/.idea/description.html
+0
-1
encodings.xml
garage/.idea/encodings.xml
+0
-6
misc.xml
garage/.idea/misc.xml
+1
-4
project-template.xml
garage/.idea/project-template.xml
+0
-3
workspace.xml
garage/.idea/workspace.xml
+116
-70
garage.iml
garage/garage.iml
+1
-2
garage.kotlin_module
garage/out/production/garage/META-INF/garage.kotlin_module
+0
-0
Brand.class
garage/out/production/garage/main/Brand.class
+0
-0
EngineType.class
garage/out/production/garage/main/EngineType.class
+0
-0
Main.class
garage/out/production/garage/main/Main.class
+0
-0
Vehicle.class
garage/out/production/garage/main/Vehicle.class
+0
-0
Brand.java
garage/src/main/Brand.java
+34
-3
EngineType.java
garage/src/main/EngineType.java
+38
-0
engineType.java
garage/src/main/engineType.java
+0
-9
No files found.
garage/.idea/description.html
deleted
100644 → 0
View file @
7968a17a
<html>
Simple
<b>
Java
</b>
application that includes a class with
<code>
main()
</code>
method
</html>
\ No newline at end of file
garage/.idea/encodings.xml
deleted
100644 → 0
View file @
7968a17a
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"Encoding"
>
<file
url=
"PROJECT"
charset=
"UTF-8"
/>
</component>
</project>
\ No newline at end of file
garage/.idea/misc.xml
View file @
bad020ac
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectKey"
>
<option
name=
"state"
value=
"project://e2804f05-5315-4fc6-a121-c522a6c26470"
/>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_11"
default=
"true"
project-jdk-name=
"11"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_11"
project-jdk-name=
"11"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/out"
/>
</component>
</project>
\ No newline at end of file
garage/.idea/project-template.xml
deleted
100644 → 0
View file @
7968a17a
<template>
<input-field
default=
"com.company"
>
IJ_BASE_PACKAGE
</input-field>
</template>
\ No newline at end of file
garage/.idea/workspace.xml
View file @
bad020ac
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"f5344ca5-83cd-466f-ae68-5dd61b35174d"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/src/main/Brand.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/Vehicle.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/engineType.java"
afterDir=
"false"
/>
<list
default=
"true"
id=
"b9f7e8e0-35d9-4b18-a962-7ed056e3a2a5"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/description.html"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/encodings.xml"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/project-template.xml"
beforeDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/Main.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/Main.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/garage.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/garage.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/out/production/garage/main/Main.class"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/out/production/garage/main/Main.class"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/Brand.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/Brand.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/main/engineType.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/main/EngineType.java"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/out/"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
...
...
@@ -16,85 +20,83 @@
<option
name=
"LAST_RESOLUTION"
value=
"IGNORE"
/>
</component>
<component
name=
"DefaultGradleProjectSettings"
>
<option
name=
"testRunner"
value=
"GRADLE"
/>
<option
name=
"delegatedBuild"
value=
"true"
/>
<option
name=
"isMigrated"
value=
"true"
/>
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/Main.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
12
0"
>
<caret
line=
"
8"
column=
"27"
selection-start-line=
"8"
selection-start-column=
"27"
selection-end-line=
"8"
selection-end-column=
"27
"
/>
<state
relative-caret-position=
"
6
0"
>
<caret
line=
"
4"
column=
"44"
selection-start-line=
"4"
selection-start-column=
"44"
selection-end-line=
"4"
selection-end-column=
"44
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/Vehicle.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
285
"
>
<caret
line=
"
19"
column=
"4"
selection-start-line=
"19"
selection-start-column=
"4"
selection-end-line=
"19"
selection-end-column=
"4
"
/>
<state
relative-caret-position=
"
30
"
>
<caret
line=
"
2"
column=
"13"
selection-start-line=
"2"
selection-start-column=
"13"
selection-end-line=
"2"
selection-end-column=
"13
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/Brand.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"90"
>
<caret
line=
"6"
column=
"12"
selection-start-line=
"6"
selection-start-column=
"12"
selection-end-line=
"6"
selection-end-column=
"12"
/>
<state
relative-caret-position=
"360"
>
<caret
line=
"26"
column=
"5"
selection-start-line=
"26"
selection-start-column=
"5"
selection-end-line=
"26"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#232#233#0"
expanded=
"true"
/>
<element
signature=
"e#260#261#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
e
ngineType.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
E
ngineType.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"105"
>
<caret
line=
"7"
column=
"13"
selection-start-line=
"7"
selection-start-column=
"13"
selection-end-line=
"7"
selection-end-column=
"13"
/>
<state
relative-caret-position=
"390"
>
<caret
line=
"26"
column=
"5"
selection-start-line=
"26"
selection-start-column=
"5"
selection-end-line=
"26"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#153#154#0"
expanded=
"true"
/>
<element
signature=
"e#187#188#0"
expanded=
"true"
/>
<element
signature=
"e#219#220#0"
expanded=
"true"
/>
<element
signature=
"e#247#248#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component
name=
"FileTemplateManagerImpl"
>
<option
name=
"RECENT_TEMPLATES"
>
<list>
<option
value=
"Class"
/>
<option
value=
"Enum"
/>
</list>
</option>
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$/.."
/>
</component>
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/src/main/Vehicle.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/Main.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/Brand.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/engineType.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/Brand.java"
/>
<option
value=
"$PROJECT_DIR$/src/main/EngineType.java"
/>
</list>
</option>
</component>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"21"
/>
<option
name=
"y"
value=
"
28
"
/>
<option
name=
"y"
value=
"
45
"
/>
<option
name=
"width"
value=
"1878"
/>
<option
name=
"height"
value=
"1031"
/>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
>
<ConfirmationsSetting
value=
"2"
id=
"Add"
/>
<option
name=
"height"
value=
"1014"
/>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
/>
<component
name=
"ProjectView"
>
<navigator
proportions=
""
version=
"1"
>
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<subPane>
...
...
@@ -118,12 +120,20 @@
<select
/>
</subPane>
</pane>
<pane
id=
"Scope"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"SHARE_PROJECT_CONFIGURATION_FILES"
value=
"true"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"reference.settingsdialog.project.gradle"
/>
</component>
<component
name=
"RunDashboard"
>
<option
name=
"configurationTypes"
>
<set>
<option
value=
"JarApplication"
/>
</set>
</option>
<option
name=
"ruleStates"
>
<list>
<RuleState>
...
...
@@ -136,12 +146,21 @@
</option>
</component>
<component
name=
"RunManager"
>
<configuration
name=
"Main"
type=
"Application"
factoryName=
"Application"
temporary=
"true"
>
<configuration
name=
"Main"
type=
"Application"
factoryName=
"Application"
temporary=
"true"
nameIsGenerated=
"true"
>
<option
name=
"MAIN_CLASS_NAME"
value=
"main.Main"
/>
<module
name=
"garage"
/>
<option
name=
"WORKING_DIRECTORY"
value=
"file://$PROJECT_DIR$"
/>
<RunnerSettings
RunnerId=
"Run"
/>
<ConfigurationWrapper
RunnerId=
"Run"
/>
<extension
name=
"coverage"
>
<pattern>
<option
name=
"PATTERN"
value=
"main.*"
/>
<option
name=
"ENABLED"
value=
"true"
/>
</pattern>
</extension>
<method
v=
"2"
>
<option
name=
"Make"
enabled=
"true"
/>
</method>
</configuration>
<configuration
default=
"true"
type=
"Application"
factoryName=
"Application"
>
<option
name=
"MAIN_CLASS_NAME"
value=
"main.Main"
/>
<method
v=
"2"
>
<option
name=
"Make"
enabled=
"true"
/>
</method>
...
...
@@ -157,74 +176,101 @@
</component>
<component
name=
"TaskManager"
>
<task
active=
"true"
id=
"Default"
summary=
"Default task"
>
<changelist
id=
"
f5344ca5-83cd-466f-ae68-5dd61b35174d
"
name=
"Default Changelist"
comment=
""
/>
<created>
155721
5426089
</created>
<changelist
id=
"
b9f7e8e0-35d9-4b18-a962-7ed056e3a2a5
"
name=
"Default Changelist"
comment=
""
/>
<created>
155721
8282461
</created>
<option
name=
"number"
value=
"Default"
/>
<option
name=
"presentableId"
value=
"Default"
/>
<updated>
155721
5426089
</updated>
<updated>
155721
8282461
</updated>
</task>
<servers
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"21"
y=
"
28"
width=
"1878"
height=
"1031
"
extended-state=
"0"
/>
<frame
x=
"21"
y=
"
45"
width=
"1878"
height=
"1014
"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"Image Layers"
/>
<window_info
id=
"Designer"
/>
<window_info
id=
"UI Designer"
/>
<window_info
id=
"Capture Tool"
/>
<window_info
id=
"Favorites"
side_tool=
"true"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.25"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.2527233"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Messages"
/>
<window_info
id=
"Image Layers"
order=
"2"
/>
<window_info
id=
"Designer"
order=
"3"
/>
<window_info
id=
"UI Designer"
order=
"4"
/>
<window_info
id=
"Capture Tool"
order=
"5"
/>
<window_info
id=
"Favorites"
order=
"6"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Run Dashboard"
/>
<window_info
anchor=
"bottom"
id=
"Messages"
weight=
"0.3292683"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.32
317737
"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.32
92683
"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
/>
<window_info
anchor=
"right"
id=
"Palette"
/>
<window_info
anchor=
"right"
id=
"Theme Preview"
/>
<window_info
anchor=
"right"
id=
"Maven"
/>
<window_info
anchor=
"right"
id=
"Capture Analysis"
/>
<window_info
anchor=
"right"
id=
"Palette	"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"8"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"9"
/>
<window_info
anchor=
"right"
id=
"Commander"
internal_type=
"SLIDING"
order=
"0"
type=
"SLIDING"
weight=
"0.4"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
anchor=
"right"
content_ui=
"combo"
id=
"Hierarchy"
order=
"2"
weight=
"0.25"
/>
<window_info
anchor=
"right"
id=
"Palette"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Maven"
order=
"4"
/>
<window_info
anchor=
"right"
id=
"Theme Preview"
order=
"5"
/>
<window_info
anchor=
"right"
id=
"Capture Analysis"
order=
"6"
/>
<window_info
anchor=
"right"
id=
"Palette	"
order=
"7"
/>
</layout>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Main
.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
EngineType
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"120"
>
<caret
line=
"8"
column=
"27"
selection-start-line=
"8"
selection-start-column=
"27"
selection-end-line=
"8"
selection-end-column=
"27"
/>
<state
relative-caret-position=
"390"
>
<caret
line=
"26"
column=
"5"
selection-start-line=
"26"
selection-start-column=
"5"
selection-end-line=
"26"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#153#154#0"
expanded=
"true"
/>
<element
signature=
"e#187#188#0"
expanded=
"true"
/>
<element
signature=
"e#219#220#0"
expanded=
"true"
/>
<element
signature=
"e#247#248#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/
engineType
.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Main
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
105
"
>
<caret
line=
"
7"
column=
"13"
selection-start-line=
"7"
selection-start-column=
"13"
selection-end-line=
"7"
selection-end-column=
"13
"
/>
<state
relative-caret-position=
"
60
"
>
<caret
line=
"
4"
column=
"44"
selection-start-line=
"4"
selection-start-column=
"44"
selection-end-line=
"4"
selection-end-column=
"44
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Brand
.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Vehicle
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
9
0"
>
<caret
line=
"
6"
column=
"12"
selection-start-line=
"6"
selection-start-column=
"12"
selection-end-line=
"6"
selection-end-column=
"12
"
/>
<state
relative-caret-position=
"
3
0"
>
<caret
line=
"
2"
column=
"13"
selection-start-line=
"2"
selection-start-column=
"13"
selection-end-line=
"2"
selection-end-column=
"13
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Vehicle
.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/main/
Brand
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"285"
>
<caret
line=
"19"
column=
"4"
selection-start-line=
"19"
selection-start-column=
"4"
selection-end-line=
"19"
selection-end-column=
"4"
/>
<state
relative-caret-position=
"360"
>
<caret
line=
"26"
column=
"5"
selection-start-line=
"26"
selection-start-column=
"5"
selection-end-line=
"26"
selection-end-column=
"5"
/>
<folding>
<element
signature=
"e#232#233#0"
expanded=
"true"
/>
<element
signature=
"e#260#261#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</component>
<component
name=
"masterDetails"
>
<states>
<state
key=
"ProjectJDKs.UI"
>
<settings>
<last-edited>
11
</last-edited>
<splitter-proportions>
<option
name=
"proportions"
>
<list>
<option
value=
"0.2"
/>
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
garage/garage.iml
View file @
bad020ac
...
...
@@ -8,5 +8,4 @@
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</module>
</module>
\ No newline at end of file
garage/out/production/garage/META-INF/garage.kotlin_module
0 → 100644
View file @
bad020ac
File added
garage/out/production/garage/main/Brand.class
0 → 100644
View file @
bad020ac
File added
garage/out/production/garage/main/EngineType.class
0 → 100644
View file @
bad020ac
File added
garage/out/production/garage/main/Main.class
View file @
bad020ac
No preview for this file type
garage/out/production/garage/main/Vehicle.class
0 → 100644
View file @
bad020ac
File added
garage/src/main/Brand.java
View file @
bad020ac
...
...
@@ -2,7 +2,38 @@ package main;
public
enum
Brand
{
RENAULT
,
PEUGEOT
,
CITROEN
;
RENAULT
(
"Renault"
),
PEUGEOT
(
"Peugeot"
),
CITROEN
(
"Citroen"
);
private
final
String
value
;
Brand
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getValue
()
{
return
value
;
}
/*
public static Brand getEnum(String value) {
for (Brand brand : Brand.values()) {
if (brand.getValue().equals(value)) {
return brand;
}
}
}
*/
public
static
boolean
contains
(
String
value
)
{
for
(
Brand
brand
:
Brand
.
values
())
{
if
(
brand
.
getValue
().
equals
(
value
))
{
return
true
;
}
}
return
false
;
}
}
garage/src/main/EngineType.java
0 → 100644
View file @
bad020ac
package
main
;
public
enum
EngineType
{
DIESEL
(
"Diesel"
),
PETROL
(
"Petrol"
),
HYBRID
(
"Hybrid"
),
ELECTRIC
(
"Electric"
);
private
final
String
value
;
EngineType
(
String
value
)
{
this
.
value
=
value
;
}
public
String
getValue
()
{
return
value
;
}
/*
public static EngineType getEnum(String value) {
for (EngineType type : EngineType.values()) {
if (type.getValue().equals(value)) {
return type;
}
}
}
*/
public
static
boolean
contains
(
String
value
)
{
for
(
EngineType
type
:
EngineType
.
values
())
{
if
(
type
.
getValue
().
equals
(
value
))
{
return
true
;
}
}
return
false
;
}
}
garage/src/main/engineType.java
deleted
100644 → 0
View file @
7968a17a
package
main
;
public
enum
engineType
{
DIESEL
,
PETROL
,
HYBRID
,
ELECTRIC
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment