Package org.onosproject.net.intent
Class IntentOperation
- java.lang.Object
-
- org.onosproject.net.intent.IntentOperation
-
@Beta public final class IntentOperation extends java.lang.Object
Abstraction of an intent-related operation, e.g. add, remove, replace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IntentOperation.Type
Operation type.
-
Constructor Summary
Constructors Constructor Description IntentOperation(IntentOperation.Type type, Intent intent)
Creates an intent operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
Intent
intent()
Returns the intent to which this operation applied.IntentId
intentId()
Returns the identifier of the intent to which this operation applies.Key
key()
Returns the key for this intent.java.lang.String
toString()
IntentOperation.Type
type()
Returns the type of the operation.
-
-
-
Constructor Detail
-
IntentOperation
public IntentOperation(IntentOperation.Type type, Intent intent)
Creates an intent operation.- Parameters:
type
- operation typeintent
- intent subject
-
-
Method Detail
-
type
public IntentOperation.Type type()
Returns the type of the operation.- Returns:
- operation type
-
intentId
public IntentId intentId()
Returns the identifier of the intent to which this operation applies.- Returns:
- intent identifier
-
key
public Key key()
Returns the key for this intent.- Returns:
- key value
-
intent
public Intent intent()
Returns the intent to which this operation applied. For remove, this can be null.- Returns:
- intent that is the subject of the operation; null for remove
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-