1 16 package org.apache.commons.attributes; 17 18 22 public class DefaultSealable implements Sealable { 23 24 28 private boolean sealed = false; 29 30 public DefaultSealable () { 31 } 32 33 39 protected void checkSealed () throws IllegalStateException { 40 if (sealed) { 41 throw new IllegalStateException ("sealed"); 42 } 43 } 44 45 50 public void seal () { 51 this.sealed = true; 52 } 53 } | Popular Tags |