/** * Checks to see if pipe has content to read * @param pipe to be checked * @return <code>true</code> if pipe has content, else <code>false</code> */ public static boolean hasContentToRead(Pipe pipe) { return StackStateWalker.hasContentToRead(pipe); }
/** * Checks to see if pipe has content to read * @param pipe to be checked * @return <code>true</code> if pipe has content, else <code>false</code> */ public static boolean hasContentToRead(Pipe pipe) { return StackStateWalker.hasContentToRead(pipe); }
/** * Checks to see if pipe has content to read * @param pipe to be checked * @return <code>true</code> if pipe has content, else <code>false</code> */ public static boolean hasContentToRead(Pipe pipe) { return StackStateWalker.hasContentToRead(pipe); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected used for comparison * @return <code>true</code> if message != expected, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected) { return StackStateWalker.hasContentToRead(pipe) && (expected != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected used for comparison * @return <code>true</code> if message != expected, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected) { return StackStateWalker.hasContentToRead(pipe) && (expected != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected used for comparison * @return <code>true</code> if message != expected, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected) { return StackStateWalker.hasContentToRead(pipe) && (expected != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected used for comparison with message * @return <code>true</code> if message == expected, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected used for comparison with message * @return <code>true</code> if message == expected, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected used for comparison with message * @return <code>true</code> if message == expected, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected1 used for comparison * @param expected2 used for comparison * @return <code>true</code> if message != expected1 and message != expected2, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected1, int expected2) { return StackStateWalker.hasContentToRead(pipe) && (expected1 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) && (expected2 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected1 used for comparison * @param expected2 used for comparison * @return <code>true</code> if message != expected1 && message != expected2, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected1, int expected2) { return StackStateWalker.hasContentToRead(pipe) && (expected1 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) && (expected2 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * @param pipe * @param loc * @param expected * @return true if the value exists and matches the expected, when false is returned it does not mean not equals but rather undetermined. */ public static boolean peekEquals(Pipe pipe, int loc, int expected) { assert(LOCUtil.isLocOfAnyType(loc, TypeMask.IntegerSigned, TypeMask.IntegerSignedOptional, TypeMask.IntegerUnsigned, TypeMask.IntegerUnsignedOptional, TypeMask.GroupLength)): "Value found "+LOCUtil.typeAsString(loc); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail+(OFF_MASK&loc))); }
/** * @param pipe * @param loc * @param expected * @return true if the value exists and matches the expected, when false is returned it does not mean not equals but rather undetermined. */ public static boolean peekEquals(Pipe pipe, int loc, int expected) { assert(LOCUtil.isLocOfAnyType(loc, TypeMask.IntegerSigned, TypeMask.IntegerSignedOptional, TypeMask.IntegerUnsigned, TypeMask.IntegerUnsignedOptional, TypeMask.GroupLength)): "Value found "+LOCUtil.typeAsString(loc); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail+(OFF_MASK&loc))); }
/** * Checks pipe to see if message does not equal expected * @param pipe to be checked * @param expected1 used for comparison * @param expected2 used for comparison * @return <code>true</code> if message != expected1 and message != expected2, else <code>false</code> */ public static boolean peekNotMsg(Pipe pipe, int expected1, int expected2) { return StackStateWalker.hasContentToRead(pipe) && (expected1 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) && (expected2 != Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)); }
/** * @param pipe * @param loc * @param expected * @return true if the value exists and matches the expected, when false is returned it does not mean not equals but rather undetermined. */ public static boolean peekEquals(Pipe pipe, int loc, int expected) { assert(LOCUtil.isLocOfAnyType(loc, TypeMask.IntegerSigned, TypeMask.IntegerSignedOptional, TypeMask.IntegerUnsigned, TypeMask.IntegerUnsignedOptional, TypeMask.GroupLength)): "Value found "+LOCUtil.typeAsString(loc); return StackStateWalker.hasContentToRead(pipe) && (expected == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail+(OFF_MASK&loc))); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected1 used for comparison with message * @param expected2 used for comparison with message * @return <code>true</code> if message == expected1 and expected2, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected1, int expected2) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && ( (expected1 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected2 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) ); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected1 used for comparison with message * @param expected2 used for comparison with message * @return <code>true</code> if message == expected1 and expected2, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected1, int expected2) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && ( (expected1 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected2 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) ); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected1 used for comparison with message * @param expected2 used for comparison with message * @return <code>true</code> if message == expected1 && expected2, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected1, int expected2) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && ( (expected1 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected2 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) ); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected1 used for comparison with message * @param expected2 used for comparison with message * @param expected3 used for comparison with message * @return <code>true</code> if message equals expected1, expected2 and expected3, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected1, int expected2, int expected3) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && ( (expected1 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected2 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected3 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) ); }
/** * Checks pipe to see if message equals expected * @param pipe to be checked * @param expected1 used for comparison with message * @param expected2 used for comparison with message * @param expected3 used for comparison with message * @return <code>true</code> if message == expected1, expected2 && expected3, else <code>false</code> */ public static boolean peekMsg(Pipe pipe, int expected1, int expected2, int expected3) { assert(Pipe.singleThreadPerPipeRead(pipe.id)); return StackStateWalker.hasContentToRead(pipe) && ( (expected1 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected2 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) || (expected3 == Pipe.readValue(Pipe.slab(pipe),pipe.slabMask,pipe.ringWalker.nextWorkingTail)) ); }