org.walluck.oscar
Class CapabilityBlock

java.lang.Object
  extended by org.walluck.oscar.CapabilityBlock

public class CapabilityBlock
extends Object

The capability block, basically a vector of UUID's.

Since:
1.0
Version:
1.0
Author:
David Walluck

Constructor Summary
CapabilityBlock()
          Creates a new empty capability block.
CapabilityBlock(int flag, String uuid)
          Creates a new capability block.
 
Method Summary
 boolean equals(Object obj)
          Determines if two capability blocks are equal.
static ArrayList getCapabilities()
          Get the value of capabilities.
static CapabilityBlock getCapabilityBlock(byte[] b)
          Get the capability uuid given its data.
static CapabilityBlock getCapabilityBlock(int flag)
          Get the capability uuid given its flag.
 byte[] getData()
          Get the value of data.
 int getFlag()
          Get the value of flag.
 String getUUID()
          Get the value of uuid.
 int hashCode()
          Return the hash code of this capability block.
 void setData(byte[] data)
          Set the value of data.
 void setFlag(int flag)
          Set the value of flag.
 void setUUID(String uuid)
          Set the value of uuid.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapabilityBlock

public CapabilityBlock()
Creates a new empty capability block.


CapabilityBlock

public CapabilityBlock(int flag,
                       String uuid)
Creates a new capability block.

Parameters:
flag - the flag
uuid - the UUID string
Method Detail

getFlag

public int getFlag()
Get the value of flag.

Returns:
value of flag.

setFlag

public void setFlag(int flag)
Set the value of flag.

Parameters:
flag - Value to assign to flag.

getUUID

public String getUUID()
Get the value of uuid.

Returns:
value of uuid.

setUUID

public void setUUID(String uuid)
Set the value of uuid.

Parameters:
uuid - Value to assign to uuid.

getData

public byte[] getData()
Get the value of data.

Returns:
value of data.

setData

public void setData(byte[] data)
Set the value of data.

Parameters:
data - Value to assign to data.

equals

public boolean equals(Object obj)
Determines if two capability blocks are equal.

Overrides:
equals in class Object
Parameters:
obj - the capability block to test
Returns:
true if equal, false otherwise

hashCode

public int hashCode()
Return the hash code of this capability block.

Overrides:
hashCode in class Object
Returns:
the hash code

getCapabilityBlock

public static CapabilityBlock getCapabilityBlock(int flag)
Get the capability uuid given its flag.

Parameters:
flag - the capability flag
Returns:
the capability

getCapabilityBlock

public static CapabilityBlock getCapabilityBlock(byte[] b)
Get the capability uuid given its data.

Parameters:
b - the capability data
Returns:
the capability

getCapabilities

public static ArrayList getCapabilities()
Get the value of capabilities.

Returns:
value of capabilities.