Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Thomas Vachuska
2014-10-21 16:01:01 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
46c07adf1b2f128e336fdf717095adcebfe95759
46c07adf
1 parent
ebf51604
Added some todos.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java
core/api/src/main/java/org/onlab/onos/net/intent/Intent.java
core/api/src/main/java/org/onlab/onos/net/intent/HostToHostIntent.java
View file @
46c07ad
...
...
@@ -41,7 +41,7 @@ public final class HostToHostIntent extends ConnectivityIntent {
}
private
static
HostId
max
(
HostId
one
,
HostId
two
)
{
return
one
.
hashCode
()
>
two
.
hashCode
()
?
one
:
two
;
return
one
.
hashCode
()
>
=
two
.
hashCode
()
?
one
:
two
;
}
/**
...
...
core/api/src/main/java/org/onlab/onos/net/intent/Intent.java
View file @
46c07ad
...
...
@@ -37,8 +37,8 @@ public abstract class Intent implements BatchOperationTarget {
*/
protected
Intent
(
IntentId
id
,
ApplicationId
appId
,
Collection
<
NetworkResource
>
resources
)
{
this
.
id
=
checkNotNull
(
id
,
"Intent ID cannot be null"
);
this
.
appId
=
checkNotNull
(
appId
,
"Application ID cannot be null"
);
this
.
id
=
checkNotNull
(
id
,
"Fingerprint cannot be null"
);
this
.
resources
=
resources
;
}
...
...
@@ -77,6 +77,7 @@ public abstract class Intent implements BatchOperationTarget {
* @return intent identifier
*/
protected
static
IntentId
id
(
Object
...
fields
)
{
// FIXME: spread the bits across the full long spectrum
return
IntentId
.
valueOf
(
Objects
.
hash
(
fields
));
}
...
...
@@ -90,12 +91,12 @@ public abstract class Intent implements BatchOperationTarget {
}
@Override
public
int
hashCode
()
{
public
final
int
hashCode
()
{
return
Objects
.
hash
(
id
);
}
@Override
public
boolean
equals
(
Object
obj
)
{
public
final
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
}
...
...
Please
register
or
login
to post a comment