All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.syncbuilder.storage.Char4
java.lang.Object
   |
   +----com.syncbuilder.storage.Char4

  Summary

public final class  Char4
     extends java.lang.Object
{
          // Constructors 3
     public Char4(byte[]) throws IllegalArgumentException;
     public Char4(int);
     public Char4(String) throws IllegalArgumentException;

          // Methods 5
     public boolean equals(Char4);
     public byte[] getBytes();
     public int getInt();
     public String getString();
     public String toString();
}

The representation of a 4-character identifier. These identifiers are needed for the Creator-IDs and the database types. They need special treatment, because they are 4-byte integers, where each byte is an 8-bit character for the sake of readability.

Instances of this class are immutable.


  Cross Reference

Returned By:
DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID(), DatabaseImpl.getCreatorID()





  Constructors

· Char4

Summary  |  Top
   public Char4(int id) 

Create a Char4 from a 32-bit integer.

Parameter Description
id the 32-bit integer



· Char4

Summary  |  Top
   public Char4(String id)  throws IllegalArgumentException

Create a Char4 from a String of 4 characters.

Parameter Description
id the String



· Char4

Summary  |  Top
   public Char4(byte[] b)  throws IllegalArgumentException

Create a Char4 from an array of 4 bytes.

Parameter Description
id the array



  Methods

· getInt

Summary  |  Top
   public int getInt() 

Get the 32-bit integer-value of the Char4.



· getBytes

Summary  |  Top
   public byte[] getBytes() 

Get the array of 4 bytes from the Char4.



· getString

Summary  |  Top
   public String getString() 

Get the 4-character String of the Char4.



· equals

Summary  |  Top
   public boolean equals(Char4 other) 

Is the Char4 equal to another one?



· toString

Summary  |  Top
   public String toString() 

Return the Char4's value as a pretty human-readable string.

Overrides:
toString in class Object


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7