Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
2d730781
Commit
2d730781
authored
Feb 04, 2015
by
helene ortiz
Browse files
No commit message
No commit message
parent
18699062
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fr/ill/ics/core/property/PropertyManager.java
View file @
2d730781
...
...
@@ -65,38 +65,6 @@ public class PropertyManager {
private
static
final
Logger
LOGGER
=
Logger
.
getLogger
(
PropertyManager
.
class
.
getName
());
private
Map
<
String
,
Boolean
>
clientFilesFoundPerControllerType
;
// Store controller types which client files have already been read
static
class
CommandBoxKey
{
private
String
serverId
;
private
int
commandBoxId
;
public
CommandBoxKey
(
String
serverId
,
int
commandBoxId
)
{
this
.
serverId
=
serverId
;
this
.
commandBoxId
=
commandBoxId
;
}
public
String
toString
()
{
return
serverId
+
"-"
+
commandBoxId
;
}
public
int
hashCode
()
{
return
this
.
toString
().
hashCode
();
}
public
boolean
equals
(
Object
key
)
{
if
(
key
==
null
)
{
return
false
;
}
if
(
this
.
getClass
()
!=
key
.
getClass
())
{
return
false
;
}
String
content
=
((
CommandBoxKey
)
key
).
toString
();
return
this
.
toString
().
equals
(
content
);
}
}
private
PropertyParser
propertyParser
;
private
Map
<
Integer
,
Map
<
String
,
Property
>>
propertyMap
=
new
HashMap
<
Integer
,
Map
<
String
,
Property
>>(
NB_CONTROLLERS
);
// KEY=Servant id VALUE=Map(KEY=propertyName VALUE=Property instance)
...
...
@@ -886,4 +854,36 @@ public class PropertyManager {
public
void
removePropertyDescriptor
(
String
controllerType
)
{
propertiesByControllerType
.
remove
(
controllerType
);
}
static
class
CommandBoxKey
{
private
String
serverId
;
private
int
commandBoxId
;
public
CommandBoxKey
(
String
serverId
,
int
commandBoxId
)
{
this
.
serverId
=
serverId
;
this
.
commandBoxId
=
commandBoxId
;
}
public
String
toString
()
{
return
serverId
+
"-"
+
commandBoxId
;
}
public
int
hashCode
()
{
return
this
.
toString
().
hashCode
();
}
public
boolean
equals
(
Object
key
)
{
if
(
key
==
null
)
{
return
false
;
}
if
(
this
.
getClass
()
!=
key
.
getClass
())
{
return
false
;
}
String
content
=
((
CommandBoxKey
)
key
).
toString
();
return
this
.
toString
().
equals
(
content
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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