Class Maps.MapGetter<K,V>

java.lang.Object
com.landawn.abacus.util.Maps.MapGetter<K,V>
Enclosing class:
Maps

public static class Maps.MapGetter<K,V> extends Object
  • Method Details

    • of

      public static <K, V> Maps.MapGetter<K,V> of(Map<K,V> map)
      Type Parameters:
      K -
      V -
      Parameters:
      map -
      Returns:
    • of

      public static <K, V> Maps.MapGetter<K,V> of(Map<K,V> map, boolean defaultForPrimitive)
      Type Parameters:
      K -
      V -
      Parameters:
      map -
      defaultForPrimitive -
      Returns:
    • getBoolean

      public Boolean getBoolean(Object key)
      Parameters:
      key -
      Returns:
    • getChar

      public Character getChar(Object key)
      Parameters:
      key -
      Returns:
    • getByte

      public Byte getByte(Object key)
      Parameters:
      key -
      Returns:
    • getShort

      public Short getShort(Object key)
      Parameters:
      key -
      Returns:
    • getInt

      public Integer getInt(Object key)
      Parameters:
      key -
      Returns:
    • getLong

      public Long getLong(Object key)
      Parameters:
      key -
      Returns:
    • getFloat

      public Float getFloat(Object key)
      Parameters:
      key -
      Returns:
    • getDouble

      public Double getDouble(Object key)
      Parameters:
      key -
      Returns:
    • getBigInteger

      public BigInteger getBigInteger(Object key)
      Parameters:
      key -
      Returns:
    • getBigDecimal

      public BigDecimal getBigDecimal(Object key)
      Parameters:
      key -
      Returns:
    • getString

      public String getString(Object key)
      Parameters:
      key -
      Returns:
    • getCalendar

      public Calendar getCalendar(Object key)
      Parameters:
      key -
      Returns:
    • getJUDate

      public Date getJUDate(Object key)
      Parameters:
      key -
      Returns:
    • getDate

      public Date getDate(Object key)
      Parameters:
      key -
      Returns:
    • getTime

      public Time getTime(Object key)
      Parameters:
      key -
      Returns:
    • getTimestamp

      public Timestamp getTimestamp(Object key)
      Parameters:
      key -
      Returns:
    • getLocalDate

      public LocalDate getLocalDate(Object key)
      Parameters:
      key -
      Returns:
    • getLocalTime

      public LocalTime getLocalTime(Object key)
      Parameters:
      key -
      Returns:
    • getLocalDateTime

      public LocalDateTime getLocalDateTime(Object key)
      Parameters:
      key -
      Returns:
    • getZonedDateTime

      public ZonedDateTime getZonedDateTime(Object key)
      Parameters:
      key -
      Returns:
    • getObject

      public Object getObject(Object key)
      Parameters:
      key -
      Returns:
    • get

      public <T> T get(Object key, Class<? extends T> targetType)
      Returns null if no value found by the specified key, or the value is null.
      Node: To follow one of general design rules in Abacus, if there is a conversion behind when the source value is not assignable to the target type, put the targetType to last parameter of the method. Otherwise, put the targetTpye to the first parameter of the method.
      Type Parameters:
      T -
      Parameters:
      key -
      targetType -
      Returns:
    • get

      public <T> T get(Object key, com.landawn.abacus.type.Type<? extends T> targetType)
      Returns null if no value found by the specified key, or the value is null.
      Node: To follow one of general design rules in Abacus, if there is a conversion behind when the source value is not assignable to the target type, put the targetType to last parameter of the method. Otherwise, put the targetTpye to the first parameter of the method.
      Type Parameters:
      T -
      Parameters:
      key -
      targetType -
      Returns: