1 30 package org.jruby.runtime; 31 32 36 public final class Iter { 37 38 public static final Iter ITER_NOT = new Iter("NOT"); 39 40 public static final Iter ITER_PRE = new Iter("PRE"); 41 42 public static final Iter ITER_CUR = new Iter("CUR"); 43 44 private String debug; 45 46 private Iter(final String debug) { 47 this.debug = debug; 48 } 49 50 public final boolean isNot() { 51 return this == ITER_NOT; 52 } 53 54 public final boolean isPre() { 55 return this == ITER_PRE; 56 } 57 58 public final boolean isCur() { 59 return this == ITER_CUR; 60 } 61 62 public boolean isBlockGiven() { 63 return !isNot(); 64 } 65 66 public String toString() { 67 return debug; 68 } 69 } 70 | Popular Tags |