Package com.tick42.glue.core.interop

# Class Instance

java.lang.Object
com.tick42.glue.core.interop.Instance

    public final class Instance
    extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `Instance.Builder` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `boolean` | `equals​(Object o)` |
  `void` | `forEach​(BiConsumer<? super String,​? super Object> action)` |
  `Object` | `get​(String name)` |
  `String` | `getApplication()` | Returns the name of the application.
  `String` | `getMachine()` | Returns the name of the machine.
  `String` | `getUser()` | Returns the name of the user.
  `int` | `hashCode()` |
  `boolean` | `isLocal()` | Returns whether or not this instance is running on the local machine.
  `boolean` | `matches​(Map<String,​Object> query)` | Check if the instance matches all of the fields contained in the query.
  `String` | `toString()` |

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getApplication

    public String getApplication()
    Returns the name of the application.
    Returns:
      the name of the application, may be `null`.

  - ### getUser

    public String getUser()
    Returns the name of the user.
    Returns:
      the name of the user, never `null`

  - ### getMachine

    public String getMachine()
    Returns the name of the machine.
    Returns:
      the name of the machine, never `null`

  - ### isLocal

    public boolean isLocal()
    Returns whether or not this instance is running on the local machine.
    Returns:
      `true` if local, `false` if remote
    Since:
      1.3

  - ### equals

    public boolean equals​(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### get

    public Object get​(String name)

  - ### matches

    public boolean matches​(Map<String,​Object> query)
    Check if the instance matches all of the fields contained in the query. Only returns `true` if the query matches completely
    Parameters:
      `query` - contains fields that should match this instance's fields
    Returns:
      whether or not the instance completely matches the query
    Since:
      1.3

  - ### forEach

    public void forEach​(BiConsumer<? super String,​? super Object> action)