1 32 package net.sf.retrotranslator.runtime.java.lang; 33 34 import java.util.*; 35 36 39 public class _Iterable { 40 41 public static boolean executeInstanceOfInstruction(Object object) { 42 return object instanceof Collection || 43 object instanceof Iterable_; 44 } 45 46 public static Object executeCheckCastInstruction(Object object) { 47 if (object instanceof Collection) { 48 return (Collection) object; 49 } 50 return (Iterable_) object; 51 } 52 53 public static Iterator iterator(Object object) { 54 if (object instanceof Collection) { 55 return ((Collection) object).iterator(); 56 } 57 return ((Iterable_) object).iterator(); 58 } 59 60 } 61 | Popular Tags |