Brooklyn

brooklyn.policy.followthesun
[Java] Class WeightedObject

java.lang.Object
  brooklyn.policy.followthesun.WeightedObject
All Implemented Interfaces:
java.lang.Comparable

public class WeightedObject

Constructor Summary
WeightedObject(java.lang.Object obj, double weight)

 
Method Summary
int compareTo(WeightedObject o)

Note that equals and compareTo are not consistent: x.compareTo(y)==0 iff x.equals(y) is highly recommended in Java, but is not required.

boolean equals(java.lang.Object obj)

java.lang.Object getObject()

double getWeight()

int hashCode()

true irrespective of weight

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

WeightedObject

public WeightedObject(java.lang.Object obj, double weight)


 
Method Detail

compareTo

public int compareTo(WeightedObject o)
Note that equals and compareTo are not consistent: x.compareTo(y)==0 iff x.equals(y) is highly recommended in Java, but is not required. This can make TreeSet etc behave poorly...


equals

de
	/** true irrespective of weight */
	public
public boolean equals(java.lang.Object obj)


getObject

public java.lang.Object getObject()


getWeight

public double getWeight()


hashCode

de
	public
public int hashCode()
true irrespective of weight


toString

de
	public
public java.lang.String toString()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.