Package com.metsci.glimpse.core.context
Class UnmodifiableTargetStack
- java.lang.Object
-
- com.metsci.glimpse.core.context.UnmodifiableTargetStack
-
- All Implemented Interfaces:
GlimpseTargetStack
public class UnmodifiableTargetStack extends Object implements GlimpseTargetStack
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableTargetStack(GlimpseTargetStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlimpseBoundsgetBounds()List<GlimpseBounds>getBoundsList()intgetSize()GlimpseTargetgetTarget()List<GlimpseTarget>getTargetList()GlimpseTargetStackpop()Removes the top GlimpseTarget / GlimpseBounds pair from the target stack.GlimpseTargetStackpush(GlimpseTarget target)Pushes a GlimpseTarget onto this TargetStack (with dummy GlimpseBounds).GlimpseTargetStackpush(GlimpseTarget target, GlimpseBounds bounds)Adds a new GlimpseTarget and its corresponding GlimpseBounds to the TargetStack.GlimpseTargetStackpush(GlimpseTargetStack stack)Pushes an existing stack onto the top of this stack, merging the two.
-
-
-
Constructor Detail
-
UnmodifiableTargetStack
public UnmodifiableTargetStack(GlimpseTargetStack stack)
-
-
Method Detail
-
push
public GlimpseTargetStack push(GlimpseTarget target, GlimpseBounds bounds)
Description copied from interface:GlimpseTargetStackAdds a new GlimpseTarget and its corresponding GlimpseBounds to the TargetStack.- Specified by:
pushin interfaceGlimpseTargetStack- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
push
public GlimpseTargetStack push(GlimpseTarget target)
Description copied from interface:GlimpseTargetStackPushes a GlimpseTarget onto this TargetStack (with dummy GlimpseBounds).- Specified by:
pushin interfaceGlimpseTargetStack- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
push
public GlimpseTargetStack push(GlimpseTargetStack stack)
Description copied from interface:GlimpseTargetStackPushes an existing stack onto the top of this stack, merging the two.- Specified by:
pushin interfaceGlimpseTargetStack- Returns:
- this GlimpseTargetStack (to enable chaining of push calls)
-
pop
public GlimpseTargetStack pop()
Description copied from interface:GlimpseTargetStackRemoves the top GlimpseTarget / GlimpseBounds pair from the target stack.- Specified by:
popin interfaceGlimpseTargetStack
-
getTarget
public GlimpseTarget getTarget()
- Specified by:
getTargetin interfaceGlimpseTargetStack- Returns:
- The GlimpseTarget at the top of the target stack (the highest index)
-
getBounds
public GlimpseBounds getBounds()
- Specified by:
getBoundsin interfaceGlimpseTargetStack- Returns:
- The GlimpsetBounds associated with the GlimpseTarget at the top of the target stack
-
getTargetList
public List<GlimpseTarget> getTargetList()
- Specified by:
getTargetListin interfaceGlimpseTargetStack
-
getBoundsList
public List<GlimpseBounds> getBoundsList()
- Specified by:
getBoundsListin interfaceGlimpseTargetStack
-
getSize
public int getSize()
- Specified by:
getSizein interfaceGlimpseTargetStack
-
-