public class

ScreenParams

extends Object
java.lang.Object
   ↳ com.neomades.app.ScreenParams

Class Overview

Screen Parameters.

Summary

Public Constructors
ScreenParams()
Create Screen parameters object.
Public Methods
boolean contains(String key)
Checks if the key is contained into this ScreenParams object.
boolean getBoolean(String key)
Returns the value associated with the key, or false (for boolean) if not exist.
float getFloat(String key)
Returns the value associated with the key, or 0 (for float) if not exist.
int getInt(String key)
Returns the value associated with the key, or 0 (for integer) if not exist.
long getLong(String key)
Returns the value associated with the key, or 0 (for long) if not exist.
Object getObject(String key)
This method is deprecated. Since NeoMAD 4.5. Do not pass Object as ScreenParams. Memory problems or crashes may occur sometimes on some platforms. Use other "put" methods that use String or primitive types and build again your complex object with that.
String getString(String key)
Get the corresponding value of the key
boolean isEmpty()
Returns if this ScreenParams object does not contain any key.
Enumeration keys()
Returns an enumeration of the keys in this ScreenParams.
ScreenParams putBoolean(String key, boolean value)
Inserts key-value content.
ScreenParams putFloat(String key, float value)
Inserts key-value content.
ScreenParams putInt(String key, int value)
Inserts key-value content.
ScreenParams putLong(String key, long value)
Inserts key-value content.
ScreenParams putObject(String key, Object value)
This method is deprecated. Since NeoMAD 4.5. Do not pass Object as ScreenParams. Memory problems or crashes may occur sometimes on some platforms. Use other "put" methods that use String or primitive types and build again your complex object with that.
ScreenParams putString(String key, String value)
Inserts key-value content.
void remove(String key)
Removes the corresponding key-value pair or does nothing if the key does not exist.
void setTransitionIn(Transition transition)
Sets the transition that will be triggered when the screen associated with this ScreenParams is opening.
void setTransitionOut(Transition transition)
Sets the transition that will be triggered when the screen associated with this ScreenParams is closing.
int size()
Returns the number of keys contained in this ScreenParams.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ScreenParams ()

Create Screen parameters object.

Public Methods

public boolean contains (String key)

Checks if the key is contained into this ScreenParams object.

Parameters
key the key to find
Returns
  • true if exist

public boolean getBoolean (String key)

Returns the value associated with the key, or false (for boolean) if not exist.

Parameters
key the key name
Returns
  • the value associated

public float getFloat (String key)

Returns the value associated with the key, or 0 (for float) if not exist.

Parameters
key the key name
Returns
  • the value associated

public int getInt (String key)

Returns the value associated with the key, or 0 (for integer) if not exist.

Parameters
key the key name
Returns
  • the value associated

public long getLong (String key)

Returns the value associated with the key, or 0 (for long) if not exist.

Parameters
key the key name
Returns
  • the value associated

public Object getObject (String key)

This method is deprecated.
Since NeoMAD 4.5. Do not pass Object as ScreenParams. Memory problems or crashes may occur sometimes on some platforms. Use other "put" methods that use String or primitive types and build again your complex object with that.

Get the corresponding value of the key

Parameters
key key of the element
Returns
  • value of the element or null

public String getString (String key)

Get the corresponding value of the key

Parameters
key key of the element
Returns
  • value of the element or null

public boolean isEmpty ()

Returns if this ScreenParams object does not contain any key.

Returns
  • true screen params is empty

public Enumeration keys ()

Returns an enumeration of the keys in this ScreenParams.

Returns
  • an enumeration of the keys in this ScreenParams.

public ScreenParams putBoolean (String key, boolean value)

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key is null

public ScreenParams putFloat (String key, float value)

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key is null

public ScreenParams putInt (String key, int value)

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key is null

public ScreenParams putLong (String key, long value)

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key is null

public ScreenParams putObject (String key, Object value)

This method is deprecated.
Since NeoMAD 4.5. Do not pass Object as ScreenParams. Memory problems or crashes may occur sometimes on some platforms. Use other "put" methods that use String or primitive types and build again your complex object with that.

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key or value is null

public ScreenParams putString (String key, String value)

Inserts key-value content.

Parameters
key key of the element
value value of the element
Returns
  • the current instance
Throws
NullPointerException if key or value is null

public void remove (String key)

Removes the corresponding key-value pair or does nothing if the key does not exist.

Parameters
key an existing key
Throws
NullPointerException if the key is null

public void setTransitionIn (Transition transition)

Sets the transition that will be triggered when the screen associated with this ScreenParams is opening.

Parameters
transition the transition to run when entering the screen
See Also

public void setTransitionOut (Transition transition)

Sets the transition that will be triggered when the screen associated with this ScreenParams is closing.

Parameters
transition the transition to run when closing the screen
See Also

public int size ()

Returns the number of keys contained in this ScreenParams.

Returns
  • number of keys