Class CameraSize

  • All Implemented Interfaces:

    
    public class CameraSize
    
                        

    Helper class used to abstract the camera size attributes for api1 and api2

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final int width
      public final int height
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getWidth()
      int getHeight()
      int getLonger()
      int getShorter()
      String toString() Return the size represented as a string with the format "WxH"
      boolean equals(Object obj) Check if this size is equal to another size.
      int hashCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CameraSize

        CameraSize(Size size)
      • CameraSize

        CameraSize(int width, int height)
    • Method Detail

      • getLonger

         int getLonger()
        Returns:

        the longer of the two sides

      • getShorter

         int getShorter()
        Returns:

        the shorter of the two sides

      • toString

         String toString()

        Return the size represented as a string with the format "WxH"

        Returns:

        string representation of the size

      • equals

         boolean equals(Object obj)

        Check if this size is equal to another size.

        Two sizes are equal if and only if both their widths and heights are equal.

        A size object is never equal to any other type of object.

        Returns:

        true if the objects were equal, false otherwise