T
- mitä luokkaa tallennetaanpublic class StringAndObject<T> extends Object
Constructor and Description |
---|
StringAndObject(String name,
T obj)
Creates a string and object -object for storing data
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of the pair
|
T |
getObject()
Returns the object of the pair
|
void |
setName(String name)
Sets the name of the pair
|
void |
setObject(T object)
Sets the object of the pair
|
String |
toString() |
public StringAndObject(String name, T obj)
name
- the displayed object nameobj
- the object that is stored