Gate: Added final statement to arguments. Better handling for case insensitivity.
This commit is contained in:
parent
ed4dd5711e
commit
36be95d0f5
@ -45,7 +45,7 @@ public class Gate implements ConfigurationSerializable
|
||||
*/
|
||||
public Gate(final String id)
|
||||
{
|
||||
setId(id.toLowerCase());
|
||||
setId(id);
|
||||
}
|
||||
|
||||
|
||||
@ -55,10 +55,6 @@ public class Gate implements ConfigurationSerializable
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SETTER & GETTER
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @return This method might return a 'null' value.
|
||||
@ -76,7 +72,7 @@ public class Gate implements ConfigurationSerializable
|
||||
* supplied. Note that the supplied 'location' will be set even if an exception is thrown. Note that this
|
||||
* gate will be closed if an exception is thrown.
|
||||
*/
|
||||
public void setLocation(Location location) throws Exception
|
||||
public void setLocation(final Location location) throws Exception
|
||||
{
|
||||
this.location = location;
|
||||
|
||||
@ -107,7 +103,7 @@ public class Gate implements ConfigurationSerializable
|
||||
* supplied 'exit' will be set even if an exception is thrown. Note that this gate will be closed if an
|
||||
* exception is thrown.
|
||||
*/
|
||||
public void setExit(Location exit) throws Exception
|
||||
public void setExit(final Location exit) throws Exception
|
||||
{
|
||||
this.exit = exit;
|
||||
validate();
|
||||
@ -129,13 +125,13 @@ public class Gate implements ConfigurationSerializable
|
||||
* Note that this method will not check if another gate with the same 'id' exists!
|
||||
* @param id This parameter must not be 'null'. An exception will be thrown otherwise!
|
||||
*/
|
||||
public void setId(String id)
|
||||
public void setId(final String id)
|
||||
{
|
||||
if (id == null) {
|
||||
throw new IllegalArgumentException("gate 'id' cannot be 'null'");
|
||||
}
|
||||
|
||||
this.id = id;
|
||||
this.id = id.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user