IDTYPE - The type of the ID.@Immutable public final class TypedObject<IDTYPE> extends Object implements ITypedObject<IDTYPE>
ObjectType and an ID.
| Constructor and Description |
|---|
TypedObject(ITypedObject<IDTYPE> aObj) |
TypedObject(ObjectType aObjectType,
IDTYPE aID)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <IDTYPE> TypedObject<IDTYPE> |
create(ITypedObject<IDTYPE> aObj)
Factory method
|
static <IDTYPE> TypedObject<IDTYPE> |
create(ObjectType aObjectType,
IDTYPE aID)
Factory method
|
boolean |
equals(Object o) |
IDTYPE |
getID()
Get the unique ID of this object.
|
ObjectType |
getObjectType() |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetObjectTypeName, hasObjectTypegetComparatorIDpublic TypedObject(@Nonnull ITypedObject<IDTYPE> aObj)
aObj - The typed object to copy the stuff from. May not be
null.public TypedObject(@Nonnull ObjectType aObjectType, @Nonnull IDTYPE aID)
aObjectType - Object type to use. May not be null.aID - ID to be used. May not be null.@Nonnull public ObjectType getObjectType()
getObjectType in interface IHasObjectTypenull.@Nonnull public IDTYPE getID()
IHasIDString than the
returned value must match an XML NMToken expression (so e.g. no ':' in the
ID)!@Nonnull public static <IDTYPE> TypedObject<IDTYPE> create(@Nonnull ITypedObject<IDTYPE> aObj)
IDTYPE - The type of the ID.aObj - The typed object to copy the stuff from. May not be
null.TypedObject@Nonnull public static <IDTYPE> TypedObject<IDTYPE> create(@Nonnull ObjectType aObjectType, @Nonnull IDTYPE aID)
IDTYPE - The type of the ID.aObjectType - Object type to use. May not be null.aID - ID to be used. May not be null.TypedObjectCopyright © 2014–2022 Philip Helger. All rights reserved.