Struct ObjectID
A unique identifier assigned to each domain object within a state
Namespace: Unity.AI.Planner.DomainLanguage.TraitBased
Syntax
public struct ObjectID : IEquatable<ObjectID>
Fields
None
The reserved ObjectID value specifying a reference to no domain object
Declaration
public static ObjectID None
Field Value
Type | Description |
---|---|
ObjectID |
Value
ID Value
Declaration
public int Value
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
Equals(Object)
Test for equality
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Other ObjectID |
Returns
Type | Description |
---|---|
System.Boolean | Result of equality test |
Overrides
Equals(ObjectID)
Compares an ObjectID to another ObjectID
Declaration
public bool Equals(ObjectID other)
Parameters
Type | Name | Description |
---|---|---|
ObjectID | other | ObjectID for comparison |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the ObjectIDs are equal |
GetHashCode()
Get the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
Overrides
GetNext()
Provides a new domain object with an unassigned ID
Declaration
public static ObjectID GetNext()
Returns
Type | Description |
---|---|
ObjectID | Returns a new, unassigned ID |
ToString()
Returns a string that represents the ObjectID
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents the ObjectID |
Overrides
Operators
Equality(ObjectID, ObjectID)
Compares two given ObjectIDs
Declaration
public static bool operator ==(ObjectID x, ObjectID y)
Parameters
Type | Name | Description |
---|---|---|
ObjectID | x | An ObjectID |
ObjectID | y | An ObjectID |
Returns
Type | Description |
---|---|
System.Boolean | Returns if two DomainObjectIDs are equal |
Inequality(ObjectID, ObjectID)
Compares two given ObjectIDs
Declaration
public static bool operator !=(ObjectID x, ObjectID y)
Parameters
Type | Name | Description |
---|---|---|
ObjectID | x | An ObjectID |
ObjectID | y | An ObjectID |
Returns
Type | Description |
---|---|
System.Boolean | Returns if two DomainObjectIDs are not equal |