Advertisement
Guest User

Integer Container concept

a guest
Feb 19th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. /*You're gonna need a package declaration up here by the way*/
  2.  
  3. public class IntegerContainer {
  4.     int blockID = 0;
  5.     int metadata = 0;
  6.  
  7.     //The best that can be done is resetting them to 0 since integers cannot hold 'null'
  8.     public static void reset()
  9.     {
  10.         blockID = 0;
  11.         metadata = 0;
  12.     }
  13.  
  14.     public static int getStoredBlockID()
  15.     {
  16.         return blockID;
  17.     }
  18.  
  19.     public static int getStoredMetadata()
  20.     {
  21.         return metadata;
  22.     }
  23.  
  24.     public static void setBlockID(int ID)
  25.     {
  26.         blockID = ID;
  27.     }
  28.  
  29.     public static void setMetadata(int meta)
  30.     {
  31.         metadata = meta;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement