Package org.onosproject.net.intent
Class IntentOperation
- java.lang.Object
-
- org.onosproject.net.intent.IntentOperation
-
@Beta public final class IntentOperation extends java.lang.ObjectAbstraction of an intent-related operation, e.g. add, remove, replace.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIntentOperation.TypeOperation 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 booleanequals(java.lang.Object obj)inthashCode()Intentintent()Returns the intent to which this operation applied.IntentIdintentId()Returns the identifier of the intent to which this operation applies.Keykey()Returns the key for this intent.java.lang.StringtoString()IntentOperation.Typetype()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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-