类 Index<V>

    • 构造器详细资料

      • Index

        public Index()
    • 方法详细资料

      • getValues

        public List<V> getValues()
        Get data
        返回:
        Values
      • getData

        public List<V> getData()
        Get data
        返回:
        Data
      • setData

        public void setData​(List<V> value)
        Set data
        参数:
        value - Data
      • size

        public int size()
        Get data size
        返回:
        Index size
      • getFormat

        public String getFormat()
        Get string format
        返回:
        String format
      • getNameFormat

        public String getNameFormat()
        Get Name format
        返回:
      • setFormat

        public void setFormat​(String value)
        Set string format
        参数:
        value - String format
      • getName

        public String getName()
        Get name
        返回:
        Name
      • setName

        public void setName​(String value)
        Set name
        参数:
        value - Name
      • factory

        public static Index factory​(List data)
        Factory method to create a new index object
        参数:
        data - Values
        返回:
        Index object
      • factory

        public static Index factory​(List data,
                                    String name)
        Factory method to create a new index object
        参数:
        data - Values
        name - Index name
        返回:
        Index object
      • factory

        public static Index factory​(Array data)
        Factory method to create a new index object
        参数:
        data - Values
        返回:
        Index object
      • factory

        public static Index factory​(Array data,
                                    String name)
        Factory method to create a new index object
        参数:
        data - Values
        name - Index name
        返回:
        Index object
      • factory

        public static Index factory​(int n)
        Factory method to create a new index object
        参数:
        n - Values number
        返回:
        Index object
      • updateFormat

        public void updateFormat()
        Update format
      • add

        public void add​(V v)
        Add a value
        参数:
        v - Value
      • add

        public void add​(int i,
                        V v)
        Add a value
        参数:
        i - Index
        v - Value
      • append

        public Index append​(Index idx)
        Append another index
        参数:
        idx - Index
        返回:
        Appended index
      • get

        public V get​(int i)
        Get a value
        参数:
        i - Index
        返回:
        Value
      • set

        public void set​(int i,
                        V value)
        Set a value
        参数:
        i - Index
        value - Value
      • indices

        public Integer[] indices​(Object[] names)
        Get indices
        参数:
        names - Names
        返回:
        Indices
      • indices

        public Integer[] indices​(List<Object> names)
        Get indices
        参数:
        names - Names
        返回:
        Indices
      • indexAll

        public List<Integer> indexAll​(Object k)
        Get all indices of an index key
        参数:
        k - The index key
        返回:
        Indices
      • indexOf

        public int indexOf​(Object v)
        Index of
        参数:
        v - Value
        返回:
        Index
      • indexOf

        public List<Integer> indexOf​(List<V> vs)
        Index of
        参数:
        vs - Value list
        返回:
        Index list
      • contains

        public boolean contains​(V v)
        Contains function
        参数:
        v - Value
        返回:
        Boolean
      • subIndex

        public Index subIndex()
        Sub index
        返回:
        Index
      • subIndex

        public Index subIndex​(List<Integer> idx)
        Sub index
        参数:
        idx - Index list
        返回:
        Index
      • subIndex

        public Index subIndex​(int start,
                              int end,
                              int step)
        Sub index
        参数:
        start - Start index
        end - End index
        step - Step
        返回:
        Index
      • getIndices

        public Object[] getIndices​(List<Object> labels)
        Get indices
        参数:
        labels - Labels
        返回:
        Indices
      • filterIndices

        public List<Integer> filterIndices​(Array arr)
        Get indices
        参数:
        arr - Boolean array
        返回:
        Indices
      • getIndices_bak

        public Object[] getIndices_bak​(List<Object> labels)
        Get indices
        参数:
        labels - Labels
        返回:
        Indices
      • getIndices

        public Object[] getIndices​(Object label)
        Get indices
        参数:
        label - Label
        返回:
        Indices
      • getIndices_s

        public Object[] getIndices_s​(Object label)
        Get indices
        参数:
        label - Label
        返回:
        Indices
      • subList

        public static List subList​(List list,
                                   List<Integer> index)
        Sub list by index
        参数:
        list - The list
        index - The index
        返回:
        Result list
      • fillKeyList

        public Array fillKeyList​(Array data,
                                 List<Integer> rrdata)
        Fill key list
        参数:
        data - Valid data array
        rrdata - Result data flags
        返回:
        Result data array with same length as key list
      • toString_Index

        public String toString_Index​(int idx)
        Convert i_th index to string
        参数:
        idx - Index i
        返回:
        String
      • toString

        public String toString​(int idx)
        Convert i_th index to string
        参数:
        idx - Index i
        返回:
        String
      • toString

        public String toString​(int idx,
                               String format)
        Convert i_th index to string
        参数:
        idx - Index i
        format - Format string
        返回:
        String