Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## php.java.bridge
Class PhpMap

    java.lang.Object
      php.java.bridge.PhpMap

    public abstract class PhpMap

extends java.lang.Object

Maps php array get/set and foreach to java array, Map and Collections access.

Author:
  jostb

Method Summary
`abstract java.lang.Object` | `currentData()` Returns the object at the current position.
`abstract php.java.bridge.Request.PhpString` | `currentKey()` Returns the key at the current position.
`static PhpMap` | `getPhpMap(java.lang.Object value, JavaBridge bridge)` Returns a PhpMap for a given value.
`boolean` | `getType()` Returns the key type.
`abstract boolean` | `hasMore()` Checks if it is possible to advance one element
`abstract boolean` | `moveForward()` Forward one element.
`abstract boolean` | `offsetExists(java.lang.Object pos)` Checks if a given position exists.
`abstract java.lang.Object` | `offsetGet(java.lang.Object pos)` Returns the object at the posisition.
`abstract void` | `offsetSet(java.lang.Object pos, java.lang.Object val)` Set an object at position.
`abstract void` | `offsetUnset(java.lang.Object pos)` Remove an object from the position.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### currentData

    public abstract java.lang.Object currentData()

  Returns the object at the current position.

  Returns:
    The current object.

### currentKey

    public abstract php.java.bridge.Request.PhpString currentKey()

  Returns the key at the current position.

  Returns:
    The current key.

### moveForward

    public abstract boolean moveForward()

  Forward one element.

  Returns:
    true if move was possible, false otherwise.

### hasMore

    public abstract boolean hasMore()

  Checks if it is possible to advance one element

  Returns:
    true if next element exists, false otherwise

### getType

    public boolean getType()

  Returns the key type.

  Returns:
    false if key is integer (array index), true if key is string (hash key)

### offsetExists

    public abstract boolean offsetExists(java.lang.Object pos)

  Checks if a given position exists. Use one of the methods from JavaBridge instead.

  Parameters:
    `pos` - The position
  Returns:
    true if an element exists at this position, false otherwise.
  See Also:
    `JavaBridge.offsetExists(Object, Object)`, `JavaBridge.offsetExists(Map, Object)`

### offsetGet

    public abstract java.lang.Object offsetGet(java.lang.Object pos)

  Returns the object at the posisition. Use one of the methods from JavaBridge instead.

  Parameters:
    `pos` - The position.
  Returns:
    The object at the given position.
  See Also:
    `JavaBridge.offsetGet(Object, Object)`, `JavaBridge.offsetGet(Map, Object)`

### offsetSet

    public abstract void offsetSet(java.lang.Object pos,
                                   java.lang.Object val)

  Set an object at position. Use one of the methods from JavaBridge instead.

  Parameters:
    `pos` - The position.
    `val` - The object.
  See Also:
    `JavaBridge.offsetSet(Object, Object, Object)`, `JavaBridge.offsetSet(Map, Object, Object)`

### offsetUnset

    public abstract void offsetUnset(java.lang.Object pos)

  Remove an object from the position. Use one of the methods from JavaBridge instead.

  Parameters:
    `pos` - The position.
  See Also:
    `JavaBridge.offsetUnset(Object, Object)`, `JavaBridge.offsetUnset(Map, Object)`

### getPhpMap

    public static PhpMap getPhpMap(java.lang.Object value,
                                   JavaBridge bridge)

  Returns a PhpMap for a given value.

  Parameters:
    `value` - The value, must be an array or implement Map or Collection
    `bridge` - The bridge instance
  Returns:
    The PhpMap

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD