Package it.tidalwave.util
Class Key<T>
- java.lang.Object
-
- it.tidalwave.util.Key<T>
-
- All Implemented Interfaces:
StringValue,Serializable,Comparable<Key<T>>
public class Key<T> extends Object implements StringValue, Comparable<Key<T>>, Serializable
- Since:
- 1.11.0
- Version:
- $Id: $
- Author:
- Fabrizio Giudici
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Key(StringValue name)Create a new instance with the given name.Key(String name)Create a new instance with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Key<T> other)booleanequals(Object other)inthashCode()StringstringValue()Returns theStringvalue of this object.StringtoString()
-
-
-
Constructor Detail
-
Key
public Key(@Nonnull String name)
Create a new instance with the given name.- Parameters:
name- the name
-
Key
public Key(@Nonnull StringValue name)
Create a new instance with the given name.- Parameters:
name- the name
-
-
Method Detail
-
stringValue
@Nonnull public String stringValue()
Returns theStringvalue of this object.- Specified by:
stringValuein interfaceStringValue- Returns:
- the string
-
compareTo
public int compareTo(@Nonnull Key<T> other)
- Specified by:
compareToin interfaceComparable<T>
-
equals
public boolean equals(@CheckForNull Object other)
-
-