|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmedisyn.ProxyGroup
public class ProxyGroup
Represents a group of proxies that somehow belong together (e.g. they share the same type of videos like Sport, Action etc)
| Nested Class Summary | |
|---|---|
static class |
ProxyGroup.GroupSizeComparer
This class implements a Comparator for ProxyGroups. |
static class |
ProxyGroup.ReverseGroupSizeComparer
This class implements a Comparator for ProxyGroups. |
| Field Summary | |
|---|---|
private java.awt.Color |
color
|
private int |
id
|
private java.lang.String |
name
|
private java.util.Vector<X2XProxy> |
proxies
|
| Constructor Summary | |
|---|---|
ProxyGroup()
create empty ProxyGroup |
|
ProxyGroup(int id,
java.lang.String name)
create existing ProxyGroup |
|
| Method Summary | |
|---|---|
void |
addProxyToGroup(X2XProxy toAdd)
add a proxy to this group |
double |
calcCategoryFreq(FileCategory cat)
calculates the relative frequency of files of the FileCategory cat of this group (each proxy of it) TODO: change this according to formula in X2X-paper (playbackTime) |
ProxyGroup |
clone()
clones the object, the proxies are NOT cloned |
ProxyGroup |
clone2()
clones the object, the proxies ARE also cloned |
int |
compareTo(ProxyGroup o)
Implements the compareTo() based on the group name. |
boolean |
equals(ProxyGroup other)
is other ProxyGroup equal to this one? |
FileCategory |
getBestCat(java.util.Vector<FileCategory> fileCategories)
find out the best semantic category for this group of proxies |
java.awt.Color |
getColor()
|
int |
getId()
|
X2XProxy |
getLeader()
gets the leader of the group |
java.lang.String |
getName()
|
java.util.Vector<X2XProxy> |
getProxies()
|
int |
getSize()
returns the number of proxies belonging to this group |
void |
removeProxyFromGroup(X2XProxy toRemove)
remove a proxy from this group |
void |
setColor(java.awt.Color color)
|
void |
setId(int id)
|
boolean |
setLeader(X2XProxy newLeader)
Sets the given prxy as the new leader of the group |
void |
setName(java.lang.String name)
|
void |
setProxies(java.util.Vector<X2XProxy> proxies)
|
java.lang.String |
toString()
return String-representation of object |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int id
private java.lang.String name
private java.util.Vector<X2XProxy> proxies
private java.awt.Color color
| Constructor Detail |
|---|
public ProxyGroup()
public ProxyGroup(int id,
java.lang.String name)
| Method Detail |
|---|
public void addProxyToGroup(X2XProxy toAdd)
toAdd - public X2XProxy getLeader()
public boolean setLeader(X2XProxy newLeader)
public void removeProxyFromGroup(X2XProxy toRemove)
toRemove - public int getId()
public void setId(int id)
id - the id to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name - the name to setpublic java.util.Vector<X2XProxy> getProxies()
public void setProxies(java.util.Vector<X2XProxy> proxies)
proxies - the proxies to setpublic int getSize()
public java.lang.String toString()
toString in class java.lang.Objectpublic double calcCategoryFreq(FileCategory cat)
public FileCategory getBestCat(java.util.Vector<FileCategory> fileCategories)
throws java.lang.Exception
java.lang.Exceptionpublic ProxyGroup clone()
clone in class java.lang.Objectpublic ProxyGroup clone2()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color - the color to setpublic boolean equals(ProxyGroup other)
ProxyGroup equal to this one?
other -
public int compareTo(ProxyGroup o)
ProxyGroup with the specified
instance. Returns a negative integer if this instance comes first in a
natural ordering, a positive integer if the specified instance comes
first in a natural ordering, or zero if they're equal.
compareTo in interface java.lang.Comparable<ProxyGroup>o - another instance of ProxyGroup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||