fulmine
Class Domain

java.lang.Object
  extended by fulmine.Domain
All Implemented Interfaces:
IDomain

public final class Domain
extends Object
implements IDomain

A standard IDomain implementation backed by an IAutoCreatingStore that returns canonical IDomain instances.

Use the Domain#get(byte) factory method to obtain an instance.

Author:
Ramon Servadei

Field Summary
static IDomain FRAMEWORK
          The domain for framework entities
 
Method Summary
 boolean equals(Object obj)
           
static IDomain get(int code, String... name)
          Factory method to obtain a sharable, immutable Domain instance.
 String getName()
          Get the name for the domain.
 int hashCode()
           
 String toString()
           
 byte value()
          Get a byte representing the domain component for the entity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAMEWORK

public static final IDomain FRAMEWORK
The domain for framework entities

Method Detail

get

public static final IDomain get(int code,
                                String... name)
Factory method to obtain a sharable, immutable Domain instance.

Parameters:
code - the code for the type (a byte)
name - the name for the type, optional. This is only set on the first call for each code. If no name is supplied on the first call, the domain will have no name, irrespective of subsequent calls.
Returns:
a sharable, immutable IDomain instance representing the code.

value

public byte value()
Description copied from interface: IDomain
Get a byte representing the domain component for the entity.

Specified by:
value in interface IDomain
Returns:
a byte representing the domain component for the entity.

getName

public String getName()
Description copied from interface: IDomain
Get the name for the domain.

Specified by:
getName in interface IDomain
Returns:
the name for the domain

toString

public final String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2007-2009. All Rights Reserved.